1
0
Fork 0
mirror of synced 2024-06-14 00:34:51 +12:00

Add recovery code as factor

This commit is contained in:
Matej Bačo 2024-04-10 13:57:36 +00:00
parent 03446b7b8a
commit b5b8aa5302

View file

@ -3526,7 +3526,8 @@ App::get('/v1/account/mfa/factors')
$factors = new Document([
Type::TOTP => $totp !== null && $totp->getAttribute('verified', false),
Type::EMAIL => $user->getAttribute('email', false) && $user->getAttribute('emailVerification', false),
Type::PHONE => $user->getAttribute('phone', false) && $user->getAttribute('phoneVerification', false)
Type::PHONE => $user->getAttribute('phone', false) && $user->getAttribute('phoneVerification', false),
Type::RECOVERY_CODE => true
]);
$response->dynamic($factors, Response::MODEL_MFA_FACTORS);