How to change expiration limit for forgot password token from 1 hour ?
@Veera26 According to the source, the options for forgotPassword are as follows:
export type Arguments = {
collection: Collection
data: {
email: string
[key: string]: unknown
}
disableEmail?: boolean
expiration?: number
req: PayloadRequest
}
reference:
https://github.com/payloadcms/payload/blob/master/src/auth/operations/forgotPassword.ts
Lucky for you, the default is one hour
user.resetPasswordExpiration = expiration || Date.now() + 3600000; // 1 hour
OKay thanks
I will look into it
Star
Discord
online
Get help straight from the Payload team with an Enterprise License.