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
已提问 2 年前427 查看次数
1 回答
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
已回答 2 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则