mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 22:01:09 +02:00
fix(auth): use correct Better Auth API method for password reset
Change from auth.api.forgetPassword to auth.api.requestPasswordReset to match Better Auth's actual endpoint naming. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
f173a2287e
commit
8e1f44369a
1 changed files with 3 additions and 2 deletions
|
|
@ -870,13 +870,14 @@ export class BetterAuthService {
|
|||
redirectTo?: string
|
||||
): Promise<{ success: boolean; message: string }> {
|
||||
try {
|
||||
// Better Auth's forgetPassword method
|
||||
// Better Auth's requestPasswordReset endpoint
|
||||
// See: https://www.better-auth.com/docs/authentication/email-password#password-reset
|
||||
await (this.auth.api as any).forgetPassword({
|
||||
await (this.auth.api as any).requestPasswordReset({
|
||||
body: {
|
||||
email,
|
||||
redirectTo,
|
||||
},
|
||||
headers: new Headers(),
|
||||
});
|
||||
|
||||
// Always return success to prevent email enumeration
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue