fix(email-otp): type issue with extractOptionPropertyTypes (#3961)

This commit is contained in:
KinfeMichael Tariku
2025-08-12 17:45:35 -07:00
committed by GitHub
parent 0d16d8e02c
commit b332ff620e
@@ -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,
});
},
},
},
};