Since most of my users log in using MagicUrl, I also hope that users can set a password after logging in so that they can log in with it in exceptional circumstances. Now, I want to check if the user has already set their password to determine whether to use the updatePassword or createRecovery and updateRecovery methods to set their password. How to check?
Supplement: The user has already logged in.
determine whether to use the updatePassword or createRecovery and updateRecovery methods
You should be able to use updatePassword even if they don't have a password. you can pass anything for the password param.
See https://appwrite.io/docs/client/account?sdk=web-default#accountUpdatePassword
I want to check if the user has already set their password
Try looking at the passwordUpdate
attribute on the User.
Recommended threads
- Send Email Verification With REST
I am using REST to create a user on the server side after receiving form data from the client. After the account is successfully created i wanted to send the v...
- Use different email hosts for different ...
Hello, I have 2 projects and i want to be able to set up email templates in the projects. Both projects will have different email host configurations. I see ...
- Get team fail in appwrite function
I try to get team of a user inside appwrite function, but i get this error: `AppwriteException: User (role: guests) missing scope (teams.read)` If i try on cl...