
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
- Flutter - FCM: App Crashes when receivin...
- Firebase Messaging Causes ANR on Notific...
I am working on a Flutter project where I have set up notifications using Firebase Messaging. Everything was working perfectly until recently. After coming back...
- Flutter 3.32 Upgrade Warning – Appwrite ...
Hey everyone, just a heads-up after upgrading to Flutter 3.32! This likely won’t impact your development, but I wanted to give you a quick warning. ``` [log] W...
