requestPasswordReset

Hi guys is requestPasswordReset deprecated? getting this error
│ ├╴ Property 'requestPasswordReset' does not exist on type '{ twoFactor: { enable: <FetchOptions extends { method?: string | undefined; headers?: (HeadersInit & (HeadersInit | CommonHeaders)) | undefined; cache?: RequestCache | undefined; ... 32 more ...; disableValidation?: boolean | undefined; }>(data_0: Prettify<...>, data_1?: FetchOptions | undefined) => Promise<...>; };...'. ts (2339) [27, 46]
│ ├╴ Property 'requestPasswordReset' does not exist on type '{ twoFactor: { enable: <FetchOptions extends { method?: string | undefined; headers?: (HeadersInit & (HeadersInit | CommonHeaders)) | undefined; cache?: RequestCache | undefined; ... 32 more ...; disableValidation?: boolean | undefined; }>(data_0: Prettify<...>, data_1?: FetchOptions | undefined) => Promise<...>; };...'. ts (2339) [27, 46]
and my lib/auth.ts
emailAndPassword: {
enabled: true,
requireEmailVerification: true,
autoSignIn: true,
minPasswordLength: 4,
sendResetPassword: async ({ user, url, token }, request) => {
await sendEmail(user.email, "forget-password", url);
},
},
emailAndPassword: {
enabled: true,
requireEmailVerification: true,
autoSignIn: true,
minPasswordLength: 4,
sendResetPassword: async ({ user, url, token }, request) => {
await sendEmail(user.email, "forget-password", url);
},
},
Dunno what is causing it server log POST /api/auth/request-password-reset 404
5 Replies
iatomic.btc
iatomic.btcOP4mo ago
@bekacru @Ping
sebastian
sebastian4mo ago
Does other auth routes work? server log indicates that the resource is not even found, could be a problem with the auth handler
iatomic.btc
iatomic.btcOP4mo ago
Yh others works fine
GET /api/auth/list-sessions 200 in 124ms
POST /api/auth/sign-out 200 in 117ms
GET /api/auth/get-session 200 in 25ms
GET /api/auth/list-sessions 200 in 124ms
POST /api/auth/sign-out 200 in 117ms
GET /api/auth/get-session 200 in 25ms
bekacru
bekacru4mo ago
will be on latest later tonight. try it on 1.2.9-beta.10 it used to be called forgetPassword the docs update came before the release. One PR is blocking the release so expect soon
iatomic.btc
iatomic.btcOP4mo ago
ohh the docs was updated before release 😅 would wait for the release, Thanks.

Did you find this page helpful?