Skip to content

Commit 363a24c

Browse files
authored
docs: add clarity about forgot-password and verify tokens (#10247)
Adds clarity to `verifyEmail` docs, noting that the token for `forgotPassword` is different. Fixes #10236
1 parent 6f5a1e3 commit 363a24c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

docs/authentication/operations.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,10 @@ const result = await payload.verifyEmail({
269269
})
270270
```
271271

272+
Note that the token you need to pass to the `verifyEmail` function is unique to verification and is not the same as the token that you can retrieve from the `forgotPassword` operation. It can be found on the user document, as a hidden `_verificationToken` field.
273+
274+
If you'd like to retrieve this token, you can use the Local API's `find` or `findByID` methods, setting `showHiddenFields: true`.
275+
272276
## Unlock
273277

274278
If a user locks themselves out and you wish to deliberately unlock them, you can utilize the Unlock operation. The [Admin Panel](../admin/overview) features an Unlock control automatically for all collections that feature max login attempts, but you can programmatically unlock users as well by using the Unlock operation.

0 commit comments

Comments
 (0)