Skip to content

Commit

Permalink
Update backup code language to recovery code.
Browse files Browse the repository at this point in the history
  • Loading branch information
StevenDufresne committed Aug 23, 2024
1 parent 2b0e399 commit 695b78d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions settings/src/components/account-status.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ export default function AccountStatus() {

const backupBodyText =
! backupCodesEnabled && ! hasPrimaryProvider
? 'Please enable a Two-Factor security key or app before enabling backup codes.'
? 'Please enable a Two-Factor security key or app before enabling recovery codes.'
: `You have
${ backupCodesEnabled ? '' : 'not' }
verified your backup codes for two-factor authentication.`;
verified your recovery codes for two-factor authentication.`;

return (
<div className={ 'wporg-2fa__account-status' }>
Expand Down Expand Up @@ -85,7 +85,7 @@ export default function AccountStatus() {
status={
! hasPrimaryProvider && ! backupCodesEnabled ? 'pending' : backupCodesEnabled
}
headerText="Two-Factor Backup Codes"
headerText="Two-Factor Recovery Codes"
bodyText={ backupBodyText }
disabled={ ! hasPrimaryProvider }
/>
Expand Down
14 changes: 7 additions & 7 deletions settings/src/components/backup-codes.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ function Setup( { setRegenerating } ) {
<>
<div className="wporg-2fa__screen-intro">
<p>
Backup codes let you access your account if your primary two-factor
Recovery codes let you access your account if your primary two-factor
authentication method is unavailable, like if your phone is lost or stolen. Each
code can only be used once.
</p>
Expand All @@ -126,7 +126,7 @@ function Setup( { setRegenerating } ) {

<Notice status="warning" isDismissible={ false }>
<Icon icon={ warning } className="wporg-2fa__print-codes-warning" />
Without access to the one-time password app or a backup code, you will lose
Without access to the one-time password app or a recovery code, you will lose
access to your account. Once you navigate away from this page, you will not be
be able to view these codes again.
</Notice>
Expand Down Expand Up @@ -181,7 +181,7 @@ function CodeList( { codes } ) {
<div className="wporg-2fa__backup-codes-list">
{ ! codes.length && (
<p>
Generating backup codes...
Generating recovery codes...
<Spinner />
</p>
) }
Expand Down Expand Up @@ -216,22 +216,22 @@ function Manage( { setRegenerating } ) {
<>
<div className="wporg-2fa__screen-intro">
<p>
Backup codes let you access your account if your primary two-factor
Recovery codes let you access your account if your primary two-factor
authentication method is unavailable, like if your phone is lost or stolen. Each
code can only be used once.
</p>

{ backupCodesRemaining > 5 && (
<p>
You have <strong>{ backupCodesRemaining }</strong> backup codes remaining.
You have <strong>{ backupCodesRemaining }</strong> recovery codes remaining.
</p>
) }

{ backupCodesRemaining <= 5 && (
<Notice status="warning" isDismissible={ false }>
<Icon icon={ warning } />
<div>
You only have <strong>{ backupCodesRemaining }</strong> backup codes
You only have <strong>{ backupCodesRemaining }</strong> recovery codes
remaining. Please regenerate and save new ones before you run out. If
you don&apos;t, you won&apos;t be able to log into your account if you
lose your phone.
Expand All @@ -241,7 +241,7 @@ function Manage( { setRegenerating } ) {
</div>

<Button isSecondary onClick={ () => setRegenerating( true ) }>
Generate new backup codes
Generate new recovery codes
</Button>
</>
);
Expand Down
2 changes: 1 addition & 1 deletion settings/src/components/download-button.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import { useCallback } from '@wordpress/element';
import { Button } from '@wordpress/components';

export default function DownloadTxtButton( { codes, fileName = 'backup-codes.txt' } ) {
export default function DownloadTxtButton( { codes, fileName = 'recovery-codes.txt' } ) {
const downloadTxtFile = useCallback( () => {
const element = document.createElement( 'a' );
const file = new Blob( [ codes ], { type: 'text/plain' } );
Expand Down

0 comments on commit 695b78d

Please sign in to comment.