Back

Check if an user already exists

  • 0
  • Android
Chirag_doosra
14 Mar, 2024, 22:32

I'm using OTP based login in my app. I want to check if an user already has an account. If he/she doesn't have an account, their data will get uploaded to the database.

Is there any way to check if an user already exists in OTP based Phone authentication?

account.createPhoneSession() creates a new session for the existing user but doesn't throw error if user already exists.

TL;DR
Developers seeking to check if a user already exists in OTP based Phone authentication can utilize the method ```account.createPhoneSession()```. This function creates a new session for existing users, but it doesn't throw an error if the user already exists.
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