Back

Password reset without using the appwrite email-secret workflow

  • 0
  • Self Hosted
  • Flutter
ptrk6182
17 Jan, 2025, 16:34

Hi together, i want to change the users password my way. Is there a way to do this? The changePassword requires the oldPassword which is unknown in case of password reset.

TL;DR
- Developers want to reset passwords without using the appwrite email-secret workflow. - Suggested solution is to use the updatePassword function on the server side with the user's ID and a new password. The old password is not needed in case of a password reset.
hamed
17 Jan, 2025, 16:47

You can use the updatePassword function on the server side

TypeScript
User result = await users.updatePassword(
    userId: '<USER_ID>',
    password: '',
);
ptrk6182
17 Jan, 2025, 16:48

Ah perfect thank you so much @hamed

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more