Notify user that he previously uses Social Login

When a user signs up with database (password auth), but the user has used the social login already, how can we tell the person that he could try with the Social login (eg. Google)?

We’ve followed the guide to change the tenant settings to display a user exists error instead of a generic error.

But how can we further optimize the error message to show “You are using Google Login, please try again”?

image

We decided to go with this approach to save complex user flow

  1. When a Google Auth user signs up
  2. Use management API to create an email-password account with the same email address
  3. Use a randomly generated password to prevent security risk
  4. Set “email_verified”: true (because this email is Google-authenticated already)
  5. Now link this Google user account with this newly generated email-password user together by the management API
1 Like

Thanks for sharing that with the rest of community!