how to use updatePhone with user created using 0Auth2 providers like google, Facebook.etc
- 1
- Users
- Flutter
- Cloud
- Accounts

I’m working with Appwrite in flutter. And used 0Auth2 provider and updatePhone method with it. Now I’m stuck this because it needs 2 parameters phone and password. Now user doesn’t have password if it’s created with 0Auth2 provider.
P.S I’m completely new to Appwrite so please help me how to do this.

Are you using appwrite cloud?

yes

Going through the docs, looks like it's not possible to add a phone number to an account created with OAuth

What you can do is create a user document when they sign up, and store their phone number in that

then how can i verify it with sms?

you can't use phone auth and oauth together

only one

if a user signs up with their google account for example, i don't see why they'd need to login with phone as well 😅

the yea, I don't want them to log in with the phone, I just want to store their number after verifying it with sms. that's why I used updatePhone
method instead of createPhoneSession
after that according to docs we can verify that phone later when we need it.

and to use updatePhone method we need user's password which is where i'm stuck

We're going to be improving this (https://github.com/appwrite/appwrite/pull/5621)... unfortunately, right now, they would need to reset their password using the create recovery api

when will be this in production?

it will probably be a while before it gets to cloud
Recommended threads
- I am facing this error: type 'Null' is ...
When attempting to fetch areas from the area collection, the application throws an error: "type 'Null' is not a subtype of type 'int.'" This issue originates in...
- Domain Verification failed
I think i did the step by step well but just not work. When I enter the page I have this error: `Requested host does not match any Subject Alternative Names (S...
- Adding Domain to Sites [Self Hosted]
I am struggling to get this working. I stood-up a new server and deployed appwrite 1.7.4. I added update .env file _APP_DOMAIN=appwrite.mydomain.com _APP_DOMAI...
