mirror of
https://github.com/better-auth/better-auth.git
synced 2026-08-01 10:50:40 -05:00
fix(email-otp): type issue with extractOptionPropertyTypes (#3961)
This commit is contained in:
@@ -280,25 +280,24 @@ export const emailOTP = (options: EmailOTPOptions) => {
|
||||
return {
|
||||
id: "email-otp",
|
||||
init(ctx) {
|
||||
if (!opts.overrideDefaultEmailVerification) {
|
||||
return;
|
||||
}
|
||||
return {
|
||||
options: {
|
||||
emailVerification: {
|
||||
...(opts.overrideDefaultEmailVerification
|
||||
? {
|
||||
async sendVerificationEmail(data, request) {
|
||||
await endpoints.sendVerificationOTP({
|
||||
//@ts-expect-error - we need to pass the context
|
||||
context: ctx,
|
||||
request: request,
|
||||
body: {
|
||||
email: data.user.email,
|
||||
type: "email-verification",
|
||||
},
|
||||
ctx,
|
||||
});
|
||||
},
|
||||
}
|
||||
: {}),
|
||||
async sendVerificationEmail(data, request) {
|
||||
await endpoints.sendVerificationOTP({
|
||||
//@ts-expect-error - we need to pass the context
|
||||
context: ctx,
|
||||
request: request,
|
||||
body: {
|
||||
email: data.user.email,
|
||||
type: "email-verification",
|
||||
},
|
||||
ctx,
|
||||
});
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user