amplify-flutter icon indicating copy to clipboard operation
amplify-flutter copied to clipboard

Signin with apple name is getting as email id.

Open Sunsiha opened this issue 3 years ago • 10 comments

Hi I have created a cognito user pool with name. And when I try to sign in with apple name is getting as email id. the following way, that too it's not getting apple email id. It's getting the following way;

Screenshot 2022-01-04 at 11 24 32 PM

The following way attribute mapping is done; Screenshot 2022-01-04 at 11 28 20 PM

If I change the it like apple attribute name and user poll attribute name into name am not able to login only. It's throwing error. What is the solution for to to get the name not as email id.

Sunsiha avatar Jan 04 '22 18:01 Sunsiha

Hi @Sunsiha can you make sure that the mapped user pool attributes are set to mutable? Could you also share the exact error message that is being thrown? It would also be helpful if you could tell us about the versions of Flutter as well as the Amplify plugins you are using.

cshfang avatar Jan 04 '22 19:01 cshfang

Hi @Sunsiha can you make sure that the mapped user pool attributes are set to mutable? Could you also share the exact error message that is being thrown? It would also be helpful if you could tell us about the versions of Flutter as well as the Amplify plugins you are using.

By default attribute am using, once we created means we won't be able to edit, Can you please tell me how can i check that. This is how my attributes are now.

Screenshot 2022-01-05 at 5 33 41 AM

When I changed the attribute like the below, Screenshot 2022-01-05 at 5 19 08 AM

throwing error like social loginAuthException(message: Sign-in with web UI failed, recoverySuggestion: See attached exception for more details, underlyingException: com.amazonaws.mobileconnectors.cognitoauth.exceptions.AuthServiceException: invalid_request)

Using the version of amplify_auth_cognito: ^0.2.10 Flutter version details: Flutter 2.5.3 • channel stable • https://github.com/flutter/flutter.git Framework • revision 18116933e7 (3 months ago) • 2021-10-15 10:46:35 -0700 Engine • revision d3ea636dc5 Tools • Dart 2.14.4

Sunsiha avatar Jan 05 '22 00:01 Sunsiha

Hm, thank you for the additional info. After remapping, are you also signing up the user again? Would be feasible for you to try to recreate the user pool with the correct mappings to begin with?

cshfang avatar Jan 05 '22 18:01 cshfang

Hm, thank you for the additional info. After remapping, are you also signing up the user again? Would be feasible for you to try to recreate the user pool with the correct mappings to begin with?

Answers;

After remapping, are you also signing up the user again?

Scenario 1:

Step 1: Map name attribute with email. Step 2: Try to sign in(You will be able to see near to name it will b saved as email id) Step 3: Change the mapping like name with name. Step 4: Try to sign in(You will be able to see name).

Scenario 2:

Step 1: Map name attribute with email. Step 2: Try to sign in(You will be able to see near to name it will b saved as email id) Step 3: Change the mapping like name with name. Step 4: Delete the user from cognito. Step 5: Try to do sign in again. Step 6: It will throw an error as I mentioned.

Would be feasible for you to try to recreate the user pool with the correct mappings to begin with?

You mean I need to create a fresh cognito user pool from beginning? But I have already created two user pool both is behaving same way.

Sunsiha avatar Jan 06 '22 01:01 Sunsiha

Hi @Sunsiha can you make sure that the mapped user pool attributes are set to mutable? Could you also share the exact error message that is being thrown? It would also be helpful if you could tell us about the versions of Flutter as well as the Amplify plugins you are using.

By default attribute am using, once we created means we won't be able to edit, Can you please tell me how can i check that. This is how my attributes are now.

Screenshot 2022-01-05 at 5 33 41 AM

When I changed the attribute like the below, Screenshot 2022-01-05 at 5 19 08 AM

throwing error like social loginAuthException(message: Sign-in with web UI failed, recoverySuggestion: See attached exception for more details, underlyingException: com.amazonaws.mobileconnectors.cognitoauth.exceptions.AuthServiceException: invalid_request)

Using the version of amplify_auth_cognito: ^0.2.10 Flutter version details: Flutter 2.5.3 • channel stable • https://github.com/flutter/flutter.git Framework • revision 18116933e7 (3 months ago) • 2021-10-15 10:46:35 -0700 Engine • revision d3ea636dc5 Tools • Dart 2.14.4

@cshfang I doubt it's an issue with fluttter. Because same behaviour is happening or web also. So may be something with cognito user pool only.

Sunsiha avatar Jan 06 '22 04:01 Sunsiha

@Sunsiha I agree that this does not appear to be a Flutter issue. It seems like a configuration issue with the user pool - perhaps during the remapping step. I am not yet able to reproduce this on my end but will try to set up a project and remap the federated login attributes. Did you set up your auth using Amplify CLI? It could be helpful to know the options you selected via the CLI as well in helping me repro on my end.

cshfang avatar Jan 06 '22 18:01 cshfang

@Sunsiha I agree that this does not appear to be a Flutter issue. It seems like a configuration issue with the user pool - perhaps during the remapping step. I am not yet able to reproduce this on my end but will try to set up a project and remap the federated login attributes. Did you set up your auth using Amplify CLI? It could be helpful to know the options you selected via the CLI as well in helping me repro on my end.

No, I didn't created the user pool using Amplify CLI. Directly from AWS console I have created.

Screenshot 2022-01-07 at 12 29 23 AM

Sunsiha avatar Jan 06 '22 19:01 Sunsiha

@Jordan-Nelson Any update on this?

Sunsiha avatar Jan 25 '22 12:01 Sunsiha

@Jordan-Nelson Any progress on this ticket?

Sunsiha avatar Apr 26 '22 17:04 Sunsiha

@Sunsiha - I don't have an update at the moment. This is in our backlog of issues to try to reproduce.

Jordan-Nelson avatar Apr 27 '22 16:04 Jordan-Nelson

@Sunsiha - Apologies for the long delay in an update. I attempted to reproduce this today. I do not see "name" listed as of the presets in Cognito (see screenshot below). Was this added as a custom attribute mapping?

Screenshot 2024-01-24 at 12 52 55 PM

If you are still facing this issue I think it may be best to create an AWS support case for this from Support Center as this should get directed to Cognito and they can likely assist you better.

Jordan-Nelson avatar Jan 24 '24 18:01 Jordan-Nelson

@Sunsiha - I am going to close this out. As mentioned above, if you are still facing this issue I think a good next step would be to open an case in the support center.

Jordan-Nelson avatar Feb 01 '24 19:02 Jordan-Nelson