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 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南