- Newest
- Most votes
- Most comments
Hello,
I understand that Cognito JWT tokens are not returned when Amplify makes the REST API call Auth.signIn().
With Auth.signIn() API you pass the username and password to the signIn method of the Auth class to enable username and password sign-in.
[+] Sign In a user : https://docs.amplify.aws/lib/auth/emailpassword/q/platform/js/#sign-in
Auth.signIn() returns a CognitoUser Object as defined in the API Docs.
[+] API docs: https://aws-amplify.github.io/amplify-js/api/classes/authclass.html#signin
The user variable is a CognitoUser Object, which represents a single CognitoUser. The JWT Token in stored in the CognitoUser.CognitoUserSession attribute .
[+] CognitoUser : https://aws-amplify.github.io/aws-sdk-android/docs/reference/com/amazonaws/mobileconnectors/cognitoidentityprovider/CognitoUser.html
The API call updates the CognitoUser with session and token JWT. After Auth.signIn() the user Object would have been updated if AWS issued tokens. After successfully authenticating a user, Amazon Cognito issues JSON web tokens (JWT) that you can use to secure and authorize access to your own APIs, or exchange for AWS credentials.
That being said, to further look into this issue more closely, if you would like to do a resource based troubleshooting, please raise a support case with AWS for further information. If a support case has already been created please be assured that we will get back to you and assist you in the best way possible.
[+] https://console.aws.amazon.com/support/home#/case/create
Relevant content
- asked 4 months ago
- asked 2 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 3 months ago
- AWS OFFICIALUpdated a year ago