Add Optional 2FA Support (#61)
* Add TOTP MFA Support * Add Passkey MFA Support It's not impossible I missed some minor cleanup, but most things make sense and there isn't a lot of obvious duplication anymore. --------- Co-authored-by: Bruno Bernardino <me@brunobernardino.com>
This commit is contained in:
@@ -69,7 +69,9 @@ export const handler: Handlers<Data, FreshContextState> = {
|
||||
|
||||
const user = await UserModel.create(email, hashedPassword);
|
||||
|
||||
if (await AppConfig.isEmailVerificationEnabled()) {
|
||||
const isEmailVerificationEnabled = await AppConfig.isEmailVerificationEnabled();
|
||||
|
||||
if (isEmailVerificationEnabled) {
|
||||
const verificationCode = await VerificationCodeModel.create(user, user.email, 'email');
|
||||
|
||||
await sendVerifyEmailEmail(user.email, verificationCode);
|
||||
|
||||
Reference in New Issue
Block a user