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
gefragt vor 2 Jahren427 Aufrufe
1 Antwort
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
beantwortet vor 2 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen