Skip to content

Commit

Permalink
clarify long term usage of primaryProviderEnabled
Browse files Browse the repository at this point in the history
  • Loading branch information
iandunn committed May 12, 2023
1 parent 9973b5f commit 747921c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion settings/src/components/account-status.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,12 @@ export default function AccountStatus() {
const totpStatus = record[ '2fa_available_providers' ].includes( 'Two_Factor_Totp' )
? 'enabled'
: 'disabled';
const primaryProviderEnabled = 'enabled' === totpStatus; // @todo Update when webauthn UI built.
const webAuthnStatus = record[ '2fa_available_providers' ].includes(
'TwoFactor_Provider_WebAuthn'
)
? 'enabled'
: 'disabled';
const primaryProviderEnabled = 'enabled' === totpStatus || 'enabled' === webAuthnStatus;
const backupCodesStatus = record[ '2fa_available_providers' ].includes(
'Two_Factor_Backup_Codes'
)
Expand Down

0 comments on commit 747921c

Please sign in to comment.