How to integrate social logins with existing user schema?

Hi, i have an app that uses the “Username-Password-Authentication” database connection (username and password to login), its successfully integrated with custom DB, i want to change the app so users can just register + login without ever needing to add a password or username, i want to remove the old method and use a social login (google) for this.

Here is my current solution (this app is only for learning purposes, i don’t need to actually migrate users from old to new login method):

Since flows in social logins are limited, i am only able to use the “Post Login” flow:

  • register social user to local db
  • if success → login
  • if user already exists → login
  • if fail (server errors) → reject login

Whats usually the approach here? is my current solution ok?

Hi @a1lkx

Welcome to the Auth0 Community!

Thank you for posting your question! I’ll check with the team and comeback to you as soon as I have answers to your questions.

Thanks
Dawid

1 Like