-
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
Amplify-react Authenticator federated sign in doesn't create user in pool #3875
Comments
@michelem09 thanks for your question. You are correct, if you do social sign using authenticator it wont create the user on your userpool, and as you mention it will be created only if you use hosted UI. You can use Hosted UI, in a similar way as |
Well, basically I need to modify the form a bit, for example I need to put a checkbox to let user accept the TOS in the signup and with Hosted UI I can't do that. I will investigate |
@michelem09 let me know how it goes. |
Unfortunately I have other priorities now, but I will come back on this ASAP. Thanks |
I cannot understand how this works, I don't want to redirect my users to the HostedUI website. |
Has there been any update on this? |
@TOPSinfo @michelem09 There are two ways to federate with social providers in Cognito: with Identity Pools or with User Pools (via Hosted UI). If you are federating with Identity Pools (which seems to be the case) a user will not be create automatically in the User Pool... you will simply see an 'Identity' in the Identity Pool. You note that you do not want to use the Hosted UI. If your objection is based only on the fact that you do not want to use the Hosted UI interface, then you can work around this issue; it is possible to use the Hosted UI functionality without actually directing users to the Hosted UI interface. This can be accomplished by calling Auth.federated signIn with a provider parameter in the options, like so:
This will route users to Hosted UI, which will immediately redirect them to the Google login/account selection/consent screens. The user will then be passed back to your application and Amplify will handle the tokens in the OAuth response. A user should also be created in the User Pool. I hope this helps. |
@haverchuck that's great, let me try it. Thanks |
Closing this issue due to inactivity. |
@haverchuck Hi, according to your reply above: I am using hosted-ui (by calling Auth.federatedSignIn) thus the user is created in the user pool.. I don't want the user to be created in the user pool, is there a way to use hosted-ui (Auth.federatedSignIn) without it created in user pool? P.S: I have tried changing and/or removing |
This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs. Looking for a help forum? We recommend joining the Amplify Community Discord server |
** Which Category is your question related to? **
Amplify React
** What AWS Services are you utilizing? **
Cognito
** Provide additional details e.g. code snippets **
When I use my custom sign-in app done with Amplify-react Authenticator HOC and I use a social provider such as Facebook, the user sign-in but no user pool is created.
This seems to work only if I use the Hosted UI, in that case if I sign-in with Facebook I get the user created in pool as EXTERNAL_PROVIDER.
Is this wanted? Why? Is there a workaround such a lambda trigger from social sign-in I can use to create the user in pool?
I also can't find a lambda that's triggered when a user sign-in with social identity such as Facebook or Google. Is there?
The text was updated successfully, but these errors were encountered: