Newly added attribute into attributeMapping is not showing up in Cognito

0

Hi!

In my implementation, first I added mapping for "email", "givenName" and "familyName" into attributetesMapping for Google identity provider. That worked as expected: I could see my Google user email, givenName and familyName as expected in Cognito. Now, I decided to add mapping for "gender":

attributeMapping: { email: cognito.ProviderAttribute.GOOGLE_EMAIL, givenName: cognito.ProviderAttribute.GOOGLE_GIVEN_NAME, familyName: cognito.ProviderAttribute.GOOGLE_FAMILY_NAME, gender: cognito.ProviderAttribute.GOOGLE_GENDER, }

After adding it into attributeMapping, I removed my Google user from Cognito, and logged in again (in my Google account, my gender is visible by anybody. User's profile info is accessible to apps, as long as the user has made those profile info publicly available: https://developers.google.com/identity/protocols/oauth2/scopes#oauth2). So, then when I go to the Cognito console, I expected that my gender would now should up, but the problem is that it does not. I still cannot see the gender in Cognito (although that user info of mine in my Google account is publicly available, visible to anyone). What am I missing?

Thanks a lot!

rdev
asked 4 months ago58 views
No Answers

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions