otp: update docs on permissions, only require email driver if sendEmail is not false
This commit is contained in:
@@ -126,7 +126,7 @@ export function emailOTP({
|
||||
onBuilt: async () => {
|
||||
const auth = app.module.auth;
|
||||
invariant(auth && auth.enabled === true, "Auth is not enabled");
|
||||
invariant(app.drivers?.email, "Email driver is not registered");
|
||||
invariant(!sendEmail || app.drivers?.email, "Email driver is not registered");
|
||||
|
||||
const generateCode =
|
||||
_generateCode ?? (() => Math.floor(100000 + Math.random() * 900000).toString());
|
||||
|
||||
Reference in New Issue
Block a user