Back

fetchSignInMethodsForEmail equivalent ?

  • 0
  • Users
  • Accounts
  • Web
Luky
25 Aug, 2023, 18:08

Hi ! Hope you are having a great day !

Is there a way to know if a user registered via email or any other oauth providers ?

The problem:

If the user registered first with google and try to connect using email and password he only get a wrong password error. I would like to inform the user that he need to use google login.

Is there a way to create a similar function like the firebase one (fetchSignInMethodsForEmail) ?

TL;DR
The user is asking if there is an equivalent function to Firebase's "fetchSignInMethodsForEmail" in the app they are working on. They want to know if there is a way to determine if a user registered via email or any other OAuth providers. They suggest a workaround of displaying a message to the user if they are trying to log in with the wrong method. There is no solution provided in the thread.
Binyamin
25 Aug, 2023, 18:12

Even when the user is signed up using Google that user can still use the email login option. Meaning if you have

  • Email login
  • Google login
  • Facebook login Any matched email will use to access the same account.

As of now there's no way to know how the account was opened/created. The best workaround would be to display some message like:

Email & password are incorrect, try to reset your password or login with Google

Luky
25 Aug, 2023, 18:19

I understand Thanks for your fast reply ! So you don't think there is a hacky way to provide this functionality ?

Binyamin
25 Aug, 2023, 18:19

Let me check something

Binyamin
25 Aug, 2023, 18:25

I've went over it again And the data of the user in the Database is the same, it doesn't seems like there's a way as of now to spot the user creation process.

Let's wait for <:appwrite:637383039499894787> Steven response on the one.

Luky
25 Aug, 2023, 18:26

Ok thanks for checking ! I will migrate the rest of my app for now

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more