-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Login with google for the second time : email Attribute cannot be updated #3526
Comments
@uchar Hi, did you map the |
Yes I did, and It works fine for the first time but trying to sign in for the second time give me that error |
@uchar I tried to reproduce issue but couldn't. I have the email attribute as required in my user pool setting. Is your email attributes mutable? There is a |
I'm experiencing a similar issue, same setup as @uchar but I'm getting "Exception processing authorization code" the second time I sign in. In answer to your question @powerful23, the email is ticked as writable under App Clients. In fact for me there is a message there that says Required attributes are always writable |
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. |
Got the same problem. I am not using amplify, just regular OIDC client library. I get this error when using Google and SAML login through ADFS. Also doesn't matter if it's one of the standard attributes or a custom one. I tried to map 'name' attribute from google to customName, and now I am getting an error message saying 'customName' could not be updated |
@uchar Are you still experiencing this issue with later versions of Amplify? Please let us know |
This issue has been automatically closed because of inactivity. Please open a new issue if are still encountering problems. |
Still have this issue. Terrible. User pool is already in production. Can't recreate it... |
What's the resolution here because this is still happening |
Any updates on this? I'm having exactly same issue. |
Happening here too. |
It seems after two years of my report, you guys still don't fix it |
I updated my CF template and set the email to mutable: true and it does work fine for me now. |
I also experience this issue. my email attribute is set to mutable. |
I am also having the same problem |
you can't actually do this for existing user pools, you'll be hit by "Existing schema attributes cannot be modified or deleted." |
I also faced same issue and I have to nuke my User Pool to make the |
@sammartinez Hi, I think you should reopen this issue, since it's still happening and not fixed after a couple of years |
Hi @uchar - can you please submit a new Github issue for us following our template so that we can investigate this? https://github.com/aws-amplify/amplify-js/issues/new?assignees=&labels=&template=1.bug_report.yaml |
@abdallahshaban557 |
Hi @ershovio , Re-opening this issue Could you share how you have mapped the attributes between google and cognito? |
|
I use AWS CDK with Python |
Could you share a screen shot of how this looks like from the cognito console? @ershovio To get there:
|
@nadetastic any updates on it? |
Hi @ershovio I haven't been able to reproduce this issue with the same configuration you have. Since you have both email and name attributes set to Writable, you should not be having this problem - so I'm curious what else could be causing it. Note that if you setup you resource with the Amplify CLI, or through the Cognito console, you will not face this problem, which leads me to believe that there might be something else with how the CDK is generating your resources. I've discussed this with some folks from the Cognito team and are continuing that discussion. One thing I recommend is to try the work around mentioned on the Amplify documentation regarding the use of existing Cognito resources. In short you will
|
I needed to change the email and name as mutable in the CDK template - it solved the problem |
@ershovio Glad you were able to get this resolved. I'll go ahead and close this issue Thank you! |
@nadetastic I have the following attributes set to write, but I still encounter this issue with OIDC authentication. I don't think this issue is fully resolved. First login seems to be fine but subsequent logins seem to be an issue. I can even see external (OIDC) user in the userPool user list. Please, reopen this. FYI @abdallahshaban557.
User in UserPool |
Hi @anjanvb - can you please create a new Github issue with the details we need to troubleshoot this? |
got the same issue |
Hi @anjanvb @vicodinvic1 i have reopened this issue to look into the problems you are facing. Can you confirm how you configured your Cognito resources? To elaborate on the above, did you use the Amplify CLI, or AWS CDK/SDK/CloudFormation ETC |
@abdallahshaban557 @nadetastic so I think the console is a bit confusing. My userpool is being created with CDK
But then i had this in the code
and assigning the above to This caused the console to show that the I guess the confusion stems from the fact that standard attributes within |
@anjanvb Thanks for the follow up and clarification, I'm glad you were able to resolve this. I believe the confusion comes from the use of the terms A scenario to help elaborate on this:
This will result in a situation similar to what you and others have faced on this issue. In short, be sure you are setting the attribute to both References |
@nadetastic thanks for the clarification, makes sense. Given that it is known situation, i think a clarification of For example take a look at this userPoolClient attribute list, you can see that |
@anjanvb I have updated the docs and included a callout that mentions the difference between mutable and writable attributes. I'll mark this issue as closed but let me know if you have any questions, thank you! |
Hi everyone. So in order to federated login to work I need to have email set to mutable for my user pool? I currently have user pool where email is immutable and login with Google fails on second attempt. |
This issue really isn't difficult to understand. The correct behavior should be that when someone tries to log in again with Google or Apple, the system shouldn't attempt to overwrite the existing email, especially not when we're just dealing with a sign-in function. This would be a much simpler solution. Yet here I am, five years later, still facing the same problem. It's absurd that this task has been closed so many times, especially when, five years later, using version v6 with a different method (signInWithRedirect), I'm still experiencing the same issue. It seems like all the recent Amazon layoffs were from the Amplify team, because there's absolutely no support. |
It is unbelievable that this gets closed again and again. Reconsidering Cognito because of this. Might go with okta, auth0 or, god forbid, azure |
So what is the status on this? It seems it's still happening.
|
any update on this? It's still happening |
Perhaps this is not the best thread to report it, but I was facing the same nightmare in a TerraForm implementation. Solved that turning some implementations explicit, such as:
More details: |
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
email Attribute cannot be updated.
Expected behavior
When we use same email address it shouldn't update email attribute!
The text was updated successfully, but these errors were encountered: