
I want users to be able to create accounts using their phone number and login using phone number just like WhatsApp does it. How can I achieve this with app write. createPhoneSession is for registering a user. What method should I use to login an existing user cause createPhoneSession requires phone number and userId? Do I have to pass a unique userId every time a user wants to login.

Hi @Lackson Munthali ,
you just need to use createPhoneSession
for creating new session (login), if user with phone doesn't exists then appwrite will create new. so basically what you are doing right now is correct, and you can use same logic and same screen/UI for authentication (login + sign up)

Thanks for the help @kamal.panara

you can learn more here: https://appwrite.io/docs/products/auth/phone-sms
Recommended threads
- Failing to run document operations on sd...
Could someone point me in the right direction I'm going in cirlces. I have a problem with sdks and my self-hosted server in production (for ~3 years) I have bee...
- Functions fail to deploy after switching...
Hi <@1087889306208718959> , after switching my self-hosted Appwrite instance to use AWS S3 as the storage backend, my Cloud Functions stopped working. I’m runni...
- Question about the DB
Hello, I am using the database with this configuration, and when I query an operator user, the company ID shows null; however, in the AppWrite console, the docu...
