Built-in Password Reset and Verification Not functional #4989
Replies: 2 comments
-
I'm not able to reproduce it locally. I've tested with the latest PocketBase v0.22.12 executable and the following plain <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Test</title>
</head>
<body>
<script type="module">
import PocketBase from "https://cdn.jsdelivr.net/gh/pocketbase/js-sdk@v0.21.2/dist/pocketbase.es.mjs";
const pb = new PocketBase("http://127.0.0.1:8090");
await pb.collection("users").requestVerification("test@example.com");
</script>
</body>
</html> The email is received with the correct url and the verification is confirmed successfully. Something else is happening in your environment but without clear reproducible steps I'm not sure how to help. The collection name for the confirm action is usually extracted from the token query parameter so either there is something wrong with the "Action url" configuration or if you have a custom hook that intercept the mailer action make sure that it adds the correct token in the email template (auth, verification, password reset, etc. has their own token types). |
Beta Was this translation helpful? Give feedback.
-
I apologize. I was making a mistake when copying the URL out of my email provider. When viewing the token in a raw view it adds an
Incredibly, jwt.io was still decoding the token correctly (with a couple errors), so I was operating under the assumption that the token was correct. Anyway, it's all working now if I fix the URL correctly. Thanks for your time! |
Beta Was this translation helpful? Give feedback.
-
I'm setting up a new app and have just created the create user and reset password pages. I'm using the following js for those:
I receive an email as expected, and when I click on the link I am brought to a PocketBase form (using the default configuration). For the user verification email I immediately see an error "Invalid or expired verification token." For password reset I can type in a new password, but when I submit it I get an error.
When I go look in the pocketbase logs I can see the failed request. Surprisingly, the request path is "/api/collections/undefined/confirm-verification" and "/api/collections/undefined/confirm-password-reset"
It seems like somewhere the collection name is being lost. Is there something I am doing wrong here?
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions