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
demandé il y a 5 mois58 vues
Aucune réponse

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions