Rank 2: Process
This is my code:
const result = await account.updatePassword( newPassword );This is my error:
[AppwriteException: Invalid credentials. Please check the email and password.]
Votes
0
Replies
20
Participants
Unknown
Messages
21
Rank 2: Process
This is my code:
const result = await account.updatePassword( newPassword );This is my error:
[AppwriteException: Invalid credentials. Please check the email and password.]
you need to pass the old password
Rank 6: Server
I was about to say same thing
But in the docs it says old password is optional?
const result = await account.updatePassword( '', // password 'password' // oldPassword (optional));From the docs
docs:
Rank 6: Server
Ahh, my bad. Did not read that 😐
Rank 2: Process
I used OTP for forgotten password and wanted an option to update their password. I can't use oldPassword because the point is the user had forgot it:/
Rank 2: Process
I'd rather not use magicUrl as I'm developing a mobile app. With magicUrl I would either need to set up a website or host a page of my react native app. Or any other ideas?
Rank 2: Process
Oh I see I could open my app from magicURL if I set the url param to one that opens my app. But it only accepts URLs I set for Platform in my Appwrite Console. Not sure if that url could open my app? Even if it could, I'd rather not depend on this url as it may not work depending on the user's device
Rank 6: Server
An url can open your app if you have setup universal linking. I dont know if it will accept deeplink scheme....
Rank 2: Process
yes, a URL can, BUT I can only set the Platforms as URL from my Appwrite console. Not sure if those can work as one that opens my app
Rank 6: Server
what do you mean?
Can you explain a bit?
Rank 2: Process
Rank 6: Server
And were you trying this method?
User forgot password-> send otp->check otp-> update new password?
Rank 2: Process
yes, exactly
Rank 6: Server
I am not fully understanding it.
Let me clear the universal linking from my part,
In your hosted site you can put a json file with your app sha256 key and package id. When you install that app android sends a ping to that domain and checks validity. Now your app will always open the links related to the domain you shared. Like opening fb app with facebook.com. i am sorry if I did not get your requirements right
Rank 6: Server
That is not possible afaik.
For updating user password you will call passwordrecovery method with email of the user and your redirection url.
Now appwrite sends a fully modified link with secret code and user id. User clicks this and it opens your app where you can catch the params and use then to update the recovery. You can still use your own method but you have to make it yourself with your workflow and verification with cloud functions
Rank 2: Process
I don't host a site, and that's what I'm trying to avoid
Rank 6: Server
Ok
You can still use cloud functions
Rank 6: Server
Rank 6: Server
Check this out
Rank 2: Process
This is true, but I don't find opening my app from a url reliable. Often times when I use a url like so, it would open in browser instead of the app