Skip to content

Commit

Permalink
Use the configured passwordResetUrl in auth-nextjs
Browse files Browse the repository at this point in the history
When requesting reset password email, the URL from config is used, but was not really set during `auth` initialization.
the `resetUrl` param is not supported, so I've removed it from the type.
  • Loading branch information
MiroslavPetrik committed Nov 15, 2023
1 parent 71c8b88 commit e52de5c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/auth-nextjs/src/app/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ export class NextAppAuth extends NextAuth {
}
},
emailPasswordSendPasswordResetEmail: async (
data: FormData | { email: string; resetUrl: string }
data: FormData | { email: string }
) => {
if (!this.options.passwordResetUrl) {
throw new Error(`'passwordResetUrl' option not configured`);
Expand Down
1 change: 1 addition & 0 deletions packages/auth-nextjs/src/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export abstract class NextAuth {
authCookieName: options.authCookieName ?? "edgedb-session",
pkceVerifierCookieName:
options.pkceVerifierCookieName ?? "edgedb-pkce-verifier",
passwordResetUrl: options.passwordResetUrl,
};
}

Expand Down

0 comments on commit e52de5c

Please sign in to comment.