-
Notifications
You must be signed in to change notification settings - Fork 231
Attribute required during google authentication #54
Comments
Hi, In your user pool do you require PhoneNumber to be verified (this information will be helpful in debugging the issue). -Ashwin |
@ashwindevendran Yes, the phonenumber is a required attribute in user pool Thanks, Connie |
A user's phone number is out of scope when authenticating using Google as federated identity. You will probably have to fetch this manually, and add it to the data returned when the user is authenticating. |
How can I do it? |
I am not sure, but maybe a pre-authentication Lambda will help you to set the user as verified without adding a valid phone number. |
Hi, @jonasao is correct, it is not within scope for Google Sign-in (https://developers.google.com/identity/protocols/googlescopes#google_sign-in) Assuming you would like to keep the existing user pool and not migrate to a new one that does not have phone-number as a required attribute: |
@ashwindevendran Which trigger should i implement to pass the phone number? I have a pre-signup trigger in cognito user pool that links google account to an existing user in user pool. The existing user already has phone number yet the same error message is shown. The pre-signup trigger is never fired. Please advise. Thanks |
Hi @railsstudent, I think you should implement Pre authentication trigger. For more info, please see here: http://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-identity-pools-working-with-aws-lambda-triggers.html |
@yuntuowang I implemented pre authentication trigger that only does a simple console.log. |
@jonasao @yuntuowang Is there no workaround other than creating new user pool where phone number is not a required attribute? |
@railsstudent You are correct. An attribute cannot be switched between required and not required after a user pool has been created. |
Hi, have this issue been resolved. I am having exactly the same situation here. |
Getting the same issue. Has anyone found any solution? |
I am having the exact same issue. Seems like there is no trigger to intercept and fill into the blanks |
I have a Cognito user pool where email and phone number are required attributes.
When using oauth code grant flow for google authentication, the oauth callback receives error message "attributes required: phone_number"
The gmail account has phone number and I also map google attribute phoneNumbers to Phone Number user pool attribute.
Please advise how to resolve the error. Thanks.
Connie
The text was updated successfully, but these errors were encountered: