Almost EVERYONE who tried headless systems said they saw benefits. Download the state of CMS now!

Storyblok now on AWS Marketplace: Read more

O’Reilly Report: Decoupled Applications and Composable Web Architectures - Download Now

Empower your teams & get a 582% ROI: See Storyblok's CMS in action

Skip to main content

How to use the Storyblok CLI with an SSO account?

  • FAQ
  • How to use the Storyblok CLI with an SSO account?

The Storyblok CLI saves the login information in the .netrc file in your home directory on Mac or Linux. On Windows, it is stored in the _netrc file, which is also found in the home directory.

Section titled Locating the .netrc or _netrc file Locating the .netrc or _netrc file

To locate and open the .netrc file on your Mac, run the command below on your terminal:

For MacOS
        
      nano ~/.netrc
    

You can use Command Prompt to open the file directly on Windows, as shown below:

For Windows
        
      notepad %USERPROFILE%\_netrc
    

This command will open the _netrc file in Notepad. If the file doesn't exist, Notepad will create a new one when you save it.

Section titled Modifying the .netrc or _netrc file Modifying the .netrc or _netrc file

When using SSO for login, you need to modify the file. However, this assumes the user has previously logged in using the Storyblok CLI. Follow the steps below if you are using SSO for login:

  • Inside your .netrc or _netrc file, search for the line containing machine api.storyblok.com.
  • Below that one, replace the email after login with your SSO ID and Password with an OAuth token that can be generated in the account area OAuth Token.

The content of the file looks similar to this:

.netrc or _netrc
        
      machine api.storyblok.com
    login SSO_ID
    password Your_Oauth_Token

    

When logging in with Storylok CLI, you are prompted to choose a region. Make sure to select the region that matches your Storyblok space.