Some JWT tokens returned by AWSCognitoIdentityUserSession's idToken.tokenClaims are empty #5308
Labels
auth
bug
Something isn't working
cognito
Issues related to AWS Cognito
pending-triage
Issue is pending triage
I am using the AWSCognitoIdentityProvider on iOS to perform Cognito user logins, and I'm trying to retrieve the group name with the following code:
However, I'm encountering an issue where
tokenClaims
returns an empty dictionary, which is not the expected behavior. This issue only occurs with some users, even though I've tested it with multiple.Upon examining the
idToken
payload, I noticed that the base64-encoded payload contains hyphens ("-"). According to the JWT specification, payloads are supposed to be URL-safe, but I don't see any processing intokenClaims
that replaces hyphens with pluses ("+").I have confirmed that replacing hyphens with pluses in the payload allows it to be correctly converted into JSON data.
Here's the related code in the AWS SDK for iOS: AWSCognitoIdentityUser.m
Environment
The text was updated successfully, but these errors were encountered: