Skip to content

Commit

Permalink
Add TOTP security warning (#33375)
Browse files Browse the repository at this point in the history
  • Loading branch information
guardrex authored Aug 16, 2024
1 parent 0fb61a6 commit d143d7b
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ This article explains how to configure an ASP.NET Core Blazor Web App with QR co

For an introduction to two-factor authentication (2FA) with authenticator apps using a Time-based One-time Password Algorithm (TOTP), see <xref:security/authentication/identity-enable-qrcodes>.

> [!WARNING]
> An ASP.NET Core TOTP code should be kept secret because it can be used to authenticate successfully multiple times before it expires.
## Scaffold the Enable Authenticator component into the app

Follow the guidance in <xref:security/authentication/scaffold-identity#scaffold-identity-into-a-blazor-project> to scaffold `Pages\Manage\EnableAuthenticator` into the app.
Expand Down Expand Up @@ -125,6 +128,9 @@ private string GenerateQrCodeUri(string email, string unformattedKey)

Run the app and ensure that the QR code is scannable and that the code validates.

> [!WARNING]
> An ASP.NET Core TOTP code should be kept secret because it can be used to authenticate successfully multiple times before it expires.
## `EnableAuthenticator` component in reference source

The `EnableAuthenticator` component can be inspected in reference source:
Expand Down

0 comments on commit d143d7b

Please sign in to comment.