Skip to content
Back

Recover password error

  • 0
  • Self Hosted
  • Web
showmore
27 Mar, 2023, 14:07
TL;DR
User is having trouble recovering their password. They are trying to use the Create Email Session method but it doesn't exist on the server side. They have tried using REST API but are getting an error about the current user session not being found. User manages to get it working by not using the API key and doing the request unauthorized. However, they then encounter an error about missing scope. The user eventually solves the issue by updating the recovery with the userId, secret, and new password.
joeyouss
27 Mar, 2023, 15:17

hi, can you elaborate a bit more?

showmore
27 Mar, 2023, 15:21

I successfully send email with userId and secret, to finish the process I set up end point, $account = new Account($this->client);

TypeScript
    $account->updateRecovery($userId, $secret, $request->password,  $request->confirmPassword);
joeyouss
27 Mar, 2023, 15:25

password recovery flow is meant for client-to-server communication. You seem to authorized with API key. Can you do this request unauthorized instead, that should fix it? Soo dont do setAPIKey for this request....account logic should be done on client-side in general. I think you are doing it server-side ?

showmore
27 Mar, 2023, 15:28

hoo, thanks it seems its working, it through error of "Invalid token passed in the request." I think the secret is expired ?

joeyouss
27 Mar, 2023, 15:28

probably yes

joeyouss
27 Mar, 2023, 15:29

can you try creating it again

showmore
27 Mar, 2023, 15:36

its working, thanks very much

showmore
27 Mar, 2023, 15:36

one more question

showmore
27 Mar, 2023, 15:40

how can I use Create Email Session, from NET client ? I try REST API (passing Email and Password ), but i don't have user session it trigger "The current user session could not be found."

showmore
27 Mar, 2023, 15:41

In server side there is no createEmailSession() method, how can I manage this

Drake
27 Mar, 2023, 17:00

I think you have another thread for this, right? Best to keep that conversation over there

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