
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 get user account after login ...
Running the attached integration test on Windows platform I get the following error. Any idea of what I'm doing wrong ? π Starting... 01:22 +0: Appwrite Authe...
- Appwrite not having the same userId as O...
Urgent: So I am using keycloak as my OIDC provider, everything has been setup nicely. working fine. I want to know whether Appwrite creates a new `UUID` everyt...
- why the createOAuth2Token method does no...
I need it to get secret and key, how to get in flutter code?
