CognitoUserSession is not valid because idToken is null

0

I have been following the guidance from this link https://docs.amplify.aws/lib/auth/emailpassword/q/platform/js/ and when I get to Amplify.Auth.signIn(); it continues to throw the error CognitoUserSession is not valid because idToken is null. Is cognito supposed to pass an IdToken back or am I supposed to request one before executing Ampligy.Auth.signin()?

Freddy
asked 2 years ago416 views
1 Answer
0

Assign openid scope to your user pool to get ID Token. The Amazon Cognito authorization server redirects back to your app with access token. Because openid scope was not requested, Amazon Cognito doesn't return an ID token.

https://docs.aws.amazon.com/cognito/latest/developerguide/authorization-endpoint.html

AWS
Pravo
answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions