We want to deprecate the option to login/sign up via Google. What is the best practice for migrating current users who only have accounts via the google-oauth2 connection to Username-Password-Authentication connection accounts?
Hi @julia1 ,
Welcome to the Auth0 Community!
I understand that you want to migrate users in the google-oauth2 connection to the Username-Password-Authentication connection.
I tried updating the connection type with the PATCH user by id endpoint, but it does not recognize the new connection type. Looks to me this is not feasible.
So I suggest you set up Auth0 Account Linking. With this tool, users can sign up with the Username-Password-Authentication connection and link this account with their Google account.
We have two articles explaining how this works.
Meantime, let’s see if anyone else in our community can shed some light on this topic.
Same concern with my application and Account Link is the solution which I applied to solve it.
It will help to link all user accounts with the same
user_email, and locate under a unique ID (
user_id). Do you have additional requirements beyond this value? If you do not mind, please share & discuss.
Account link is an interesting option. My main concern is that we don’t want to the users to have to sign up again. From the user experience perspective, we want to provide an option for them to add a password to their existing account. Is there any way to do that where they don’t have the experience of having to sign up again?
The Account Link cover the user case of Sign In as well. If it detects that email already exist, it will ask then end-user for link account with the 1st Connection (Username-Password / Social) they registered. Follow up that concept, let the end-user sign in with any Connect they like, it is not so bad option, I think
Regarding your expectation, I propose that we can use API for implementation, following detail:
- Collect the user information :
- Create new user (actually we clone the new with the information from #1) : Auth0 Management API v2
- Link account user : Auth0 Management API v2
Hope this helps.