https://supabase.com/ logo
#help
Title
# help
b

Borisdm

06/15/2022, 11:18 AM
Copy code
const { user, error } = await supabase.auth.update({password: 'new password'})
is their a way to update another user's password? I belive the above function will update the logged in user
n

Needle

06/15/2022, 11:18 AM
Hello @Borisdm! This thread has been automatically created from your message in #843999948717555735 a few seconds ago. We have already mentioned the @User so that they can see your message and help you as soon as possible! Want to unsubscribe from this thread? Right-click the thread in Discord (or use the ``...`` menu) and select "Leave Thread" to unsubscribe from future updates. Want to change the title? Use the ``/title`` command! We have solved your problem? Click the button below to archive it.
c

chipilov

06/15/2022, 11:28 AM
You cannot do it from the client - you can either do it manually by updating the password field of the
Copy code
auth.users
table OR create a server API which updates that field (i.e. the client can then call that server API). NOTE, that the value of the password field is a HASHED version of the password, which you can achieve in Go like this:
Copy code
bcrypt.GenerateFromPassword([]byte("the_new_password"), bcrypt.DefaultCost)
b

Borisdm

06/15/2022, 1:26 PM
Where is password stored again, I can't seem to find it auth.users
Found it. Thanks