Skip to content

Commit

Permalink
Allow two-factor authentication without cookie consent. (#17136)
Browse files Browse the repository at this point in the history
  • Loading branch information
gvkries authored Dec 6, 2024
1 parent 979833a commit c017294
Showing 1 changed file with 0 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,27 +22,13 @@
return;
}

@{
var canTrack = ViewContext.HttpContext.Features.Get<ITrackingConsentFeature>()?.CanTrack ?? true;
}

@if (User.HasClaim(claim => claim.Type == UserConstants.TwoFactorAuthenticationClaimType))
{
<div class="alert alert-danger text-center py-3">
@T["Two-factor authentication must be enabled before proceeding."]
</div>
}

@if (!canTrack)
{
<div class="alert alert-danger text-center">
<strong>@T["Privacy and cookie policy have not been accepted."]</strong>
<p>@T["You must accept the policy before you can enable two-factor authentication."]</p>
</div>

return;
}

<div class="card text-bg-theme">

<div class="card-header">
Expand Down

0 comments on commit c017294

Please sign in to comment.