Back

[SOLVED]Updating password not working!

  • 0
  • Databases
  • Users
  • Web
D5
12 Jun, 2023, 06:33

You can't see user password in console

TL;DR
The user is having trouble updating their password in Appwrite. The solution is to create a session with the user's email and password using the `account.createEmailSession` method. The password is automatically checked in a hashed manner by Appwrite. It is recommended to create the session or account in both the appwrite backend and the user's backend. They are using PHP and Flutter SDK. The user should not mix Appwrite with their own database. The password should not be saved separately and should be stored securely for privacy reasons. The user cannot see the user password in the console.
hopeless_
12 Jun, 2023, 06:56

ohh i see,for privacy reasos right?yeah,understandable!

D5
12 Jun, 2023, 06:59

Yes, and security

D5
12 Jun, 2023, 07:00

They're hashed

hopeless_
12 Jun, 2023, 07:02

then i have to store the in amader system database from response,so that we can use that in creating email session or other stuff?

hopeless_
12 Jun, 2023, 07:02

btw thanks for the help,you're a life-saver!!!

D5
12 Jun, 2023, 07:04

I recommend not saving them apart. What you're trying to achieve?

hopeless_
12 Jun, 2023, 07:06
D5
12 Jun, 2023, 07:09

You need password to create email session

D5
12 Jun, 2023, 07:09

I don't understand what you're trying to achieve

D5
12 Jun, 2023, 07:10

You create the email session with the data the user has given to you, no needed to handle manually if password is correct, etc

hopeless_
12 Jun, 2023, 07:12

no,i have to create a session if user creds match with our own system databse then i'll create session for appwrite using email regstered with appwrite...but in the doc,we need a password and email to create a session...so how do i get that password

hopeless_
12 Jun, 2023, 07:14

oh yes,i see..so we're using a another database(phpmyadmin) for other stuff...don't mix that,appwrite is just user session and chat (mainly)

D5
12 Jun, 2023, 07:17

Use the same field and send a request to appwrite and your backend. Another approach is using JWT tokens

hopeless_
12 Jun, 2023, 07:19

i know i'm asking too much,but can you elaborate a little,i'm using flutter sdk

D5
12 Jun, 2023, 07:26

You have the password and email field. When the login or signup button is clicked, you create a session or account (if it doesn't exists) in both your backend and appwrite with the data in the fields of your app

D5
12 Jun, 2023, 07:26

However probably that's not the most recommended approach

hopeless_
12 Jun, 2023, 07:30

for example,suppose user set abc@gmail.com and 123123123 while login,so appwrite will set that user hashed password...later when user will login then i have to do this,(* hardcoded just to give example,it will come from form field)

Future result = account.createEmailSession( email: 'abc@gmail.com', password: '123123123', (Can appwrite will automatically check the password in hashed manner) );

hopeless_
12 Jun, 2023, 07:31

i'm really new to appwrite so please help me out,i really appreciate your concern!

D5
12 Jun, 2023, 07:37

Appwrite will automatically check if the password is correct, not needed doing any additional steps

D5
12 Jun, 2023, 07:38

Even if it's hashed

hopeless_
12 Jun, 2023, 07:45

is there any server-side(PHP) method to create session using email or phone?i didn't find any in the doc tho

D5
12 Jun, 2023, 08:16

You don't need to create a session server-sided in appwrite

D5
12 Jun, 2023, 08:17

If you want to make the mentioned connection, the most similar approach could probably be by using JWT

hopeless_
12 Jun, 2023, 11:54

[SOLVED]Updating password not working!

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