mirror of
https://github.com/bknd-io/bknd/
synced 2026-08-04 09:06:01 +00:00
clean up error, it's prefixed with the plugin name already
This commit is contained in:
@@ -118,8 +118,8 @@ export function emailOTP({
|
|||||||
),
|
),
|
||||||
onBuilt: async () => {
|
onBuilt: async () => {
|
||||||
const auth = app.module.auth;
|
const auth = app.module.auth;
|
||||||
invariant(auth && auth.enabled === true, "[OTP Plugin]: Auth is not enabled");
|
invariant(auth && auth.enabled === true, "Auth is not enabled");
|
||||||
invariant(app.drivers?.email, "[OTP Plugin]: Email driver is not registered");
|
invariant(app.drivers?.email, "Email driver is not registered");
|
||||||
|
|
||||||
const generateCode =
|
const generateCode =
|
||||||
_generateCode ?? (() => Math.floor(100000 + Math.random() * 900000).toString());
|
_generateCode ?? (() => Math.floor(100000 + Math.random() * 900000).toString());
|
||||||
|
|||||||
Reference in New Issue
Block a user