Storyblok CLI Login - Two Factor Authentication

The login in the Storyblok CLI via storyblok login works fine.
However, if you add 2 Factor Authentication via e.g. SMS to the account, you get the SMS token and can log in successfully too.

As soon as you execute a command like pull-components or generate-migration and enter the respective space, you are asked to log in again (even though you are already logged in) and then you get a 401 error:

Console Output:

? Enter your email address: markus@geilehner.io
? Enter your password: [hidden]
? We sent a code to your email/phone, please insert the authentication code: ----code—
✓ Log in successfully! Token has been added to .netrc file.
X An error occurred when loading the components from space: Unauthorized
X An error occurred when generating the migration file: Request failed with status code 401

After removing the Two Factor Authentication an re-sign in to the CLI everything is working fine again.

Kind Regards

Hello @Markus ,

thank your for reporting the issue! We’ll take a look at the problem and keep you updated.

Best regards
Hannes

Hello @Markus,

my colleagues fixed the issue. It was a routing problem.

Best regards
Hannes

1 Like