question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Login with google for the second time : email Attribute cannot be updated

See original GitHub issue

Describe the bug I have the same problem as this #issue. If you make a user pool with required email field then the second google login attempt fails. changing required fields after creating UserPool is not possible and deleting the UserPool and making a new one doesn’t look like a good solution to me because by doing it I will lose all my user’s data!

To Reproduce

  1. Make a new UserPool with email attribute as required field
  2. Enable Google federation in UserPool
  3. Try to login for the second time using hosted ui
  4. It should give you this error: email Attribute cannot be updated.

Expected behavior When we use same email address it shouldn’t update email attribute!

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:2
  • Comments:24 (5 by maintainers)

github_iconTop GitHub Comments

4reactions
ucharcommented, Jan 31, 2021

It seems after two years of my report, you guys still don’t fix it @sammartinez Actually, I moved away from Cognito a long time ago and can’t test it anymore. It was a horrible experience with a lot of bugs and a lack of necessary features

2reactions
adrian-brennancommented, Jul 30, 2019

I can reproduce the same issue. email is not mandatory for my pool, and is selected as readable and writable by my app client. First time login succeeds (and the email attribute on my Cognito user is populated), subsequent logins fail with ‘user+attributes%3A+email%3A+Attribute+cannot+be+updated’ error.

I worked around it by creating a custom attribute called ‘emailaddress’ and mapped the Google email attribute to that.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Amazon Cognito throws an error if I try to sign in a second time ...
The first time a user sign in with Google, a new user is correctly created in Cognito, but if I try to sign...
Read more >
Aws Cognito throws an error if I try to sign in a second ... - Reddit
The first time a user sign in with Google, a new user is correctly ... =Invalid+user+attributes%3A+email%3A+Attribute+cannot+be+updated.
Read more >
Signing up and confirming user accounts - Amazon Cognito
Updating the user's attributes to indicate that the email address or phone number is verified. To view this information, you can use the...
Read more >
About SSO - Google Workspace Admin Help
SSO lets users sign in just one time to get access to all their ... then access Google apps directly without a second...
Read more >
Common Errors - Ads API - Google Developers
Go to the Google API Console and navigate to the OAuth consent screen. Then change the publishing status to In production following these...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found