Skip to content

Commit

Permalink
Remove the development flags. (#235)
Browse files Browse the repository at this point in the history
  • Loading branch information
StevenDufresne committed Sep 20, 2023
1 parent 3d53b71 commit d0d3a61
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 19 deletions.
25 changes: 11 additions & 14 deletions settings/src/components/account-status.js
Expand Up @@ -56,20 +56,17 @@ export default function AccountStatus() {
}
/>

{ /* TODO: Only enable WebAuthn UI in development, until it's finished. */ }
{ 'development' === process.env.NODE_ENV && (
<SettingStatusCard
screen="webauthn"
status={ hasPrimaryProvider && ! webAuthnEnabled ? 'info' : webAuthnEnabled }
headerText="Two-Factor Security Key"
bodyText={
webAuthnEnabled
? 'You have two-factor authentication enabled using security keys.'
: 'You have not enabled security keys for two-factor authentication.'
}
isPrimary={ 'TwoFactor_Provider_WebAuthn' === primaryProvider && totpEnabled }
/>
) }
<SettingStatusCard
screen="webauthn"
status={ hasPrimaryProvider && ! webAuthnEnabled ? 'info' : webAuthnEnabled }
headerText="Two-Factor Security Key"
bodyText={
webAuthnEnabled
? 'You have two-factor authentication enabled using security keys.'
: 'You have not enabled security keys for two-factor authentication.'
}
isPrimary={ 'TwoFactor_Provider_WebAuthn' === primaryProvider && totpEnabled }
/>

<SettingStatusCard
screen="totp"
Expand Down
6 changes: 1 addition & 5 deletions settings/src/script.js
Expand Up @@ -73,13 +73,9 @@ function Main( { userId } ) {
password: <Password />,
totp: <TOTP />,
'backup-codes': <BackupCodes />,
webauthn: <WebAuthn />,
};

// TODO: Only enable WebAuthn UI in development, until it's finished.
if ( 'development' === process.env.NODE_ENV ) {
components.webauthn = <WebAuthn />;
}

// The screens where a recent two factor challenge is required.
const twoFactorRequiredScreens = [ 'webauthn', 'totp', 'backup-codes' ];

Expand Down

0 comments on commit d0d3a61

Please sign in to comment.