Password reset not working.
I have set up a password reset flow just like in the doc with
resend
api. Below is my resend config: .9 Replies
Below is my
auth.ts
file.
And finally my client form handler: .
Initially there was an error from resend
that the test emails must be the email associated with the resend account. Tried that email but got the error Uncaught Error: InvalidAccountId
at retrieveAccount
. Then i created an account with that email and i can see that user both on users
table and it's id associated with an account under authAccounts
table. Now when i try again with that email, I am getting the error Uncaught Error: InvalidAccountId
at retrieveAccount
. What could be the reason?Error: InvalidAccountId at retrieveAccount
would suggest that the email doesn't exist for the provider. Do you have in the authAccounts table a document with providerAccountId
being the email and provider
being "password"
?@Michal Srb Yes Michal, I can see the document there with
povider
as password
and the email as the value for providerAccountId
field1. Check your client is correct:
formValues.email
is actually the email string
2. Try again just to confirm
(I have verified this flow works fine in our demos)Yup the value is coming correct. Could you give me a link to that demo, so i can try it locally? I think that will help in narrow down the issue.
It's hosted here and there's a link to GitHub:
https://labs.convex.dev/auth-example
If you put together a repo with instructions to reproduce I can also have a look at your code
@Michal Srb Sure will do that and let you know.
Hi @Michal Srb, here is the link to minimal reproduction of the issue. https://github.com/dorji-dev/convex-auth. Funnily enough, if i manually pass the email that has account, like this in the resend config, it works. . I can confirm that the incoming email is coming as string after logging. Let me know if you have any other related questions.
I cannot reproduce the issue.
I added a sign up form:
used it, and used the reset form, and it worked.
Try clearing all your tables and retry.
@Michal Srb Tried right now again and it's working as expected. May be it just needed a server restart or something. Anyway thanks for your time!! Appreciated.