mirror of
https://github.com/stack-auth/stack.git
synced 2026-06-13 21:01:21 +08:00
Update apps/backend/src/app/api/latest/auth/otp/send-sign-in-code/route.tsx
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
This commit is contained in:
parent
62b7775574
commit
0bcafcd3b8
@ -33,7 +33,7 @@ export const POST = createSmartRouteHandler({
|
||||
}),
|
||||
async handler({ auth: { tenancy }, body: { email, callback_url: callbackUrl }, clientVersion }, fullReq) {
|
||||
if (!tenancy.config.auth.otp.allowSignIn) {
|
||||
throw new StatusError(StatusError.Forbidden, "Magic link is not enabled for this project");
|
||||
throw new StatusError(StatusError.Forbidden, "OTP sign-in is not enabled for this project");
|
||||
}
|
||||
|
||||
const user = await ensureUserForEmailAllowsOtp(tenancy, email);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user