mirror of
https://github.com/aaru-dps/Aaru.Server.git
synced 2025-12-16 19:24:27 +00:00
Use proper database context in new server.
This commit is contained in:
@@ -3,10 +3,9 @@
|
||||
@using System.Globalization
|
||||
@using System.Text
|
||||
@using System.Text.Encodings.Web
|
||||
@using Aaru.Server.New.Data
|
||||
@using Microsoft.AspNetCore.Identity
|
||||
|
||||
@inject UserManager<ApplicationUser> UserManager
|
||||
@inject UserManager<IdentityUser> UserManager
|
||||
@inject IdentityUserAccessor UserAccessor
|
||||
@inject UrlEncoder UrlEncoder
|
||||
@inject IdentityRedirectManager RedirectManager
|
||||
@@ -70,7 +69,7 @@ else
|
||||
private const string AuthenticatorUriFormat = "otpauth://totp/{0}:{1}?secret={2}&issuer={0}&digits=6";
|
||||
|
||||
private string? message;
|
||||
private ApplicationUser user = default!;
|
||||
private IdentityUser user = default!;
|
||||
private string? sharedKey;
|
||||
private string? authenticatorUri;
|
||||
private IEnumerable<string>? recoveryCodes;
|
||||
@@ -118,7 +117,7 @@ else
|
||||
}
|
||||
}
|
||||
|
||||
private async ValueTask LoadSharedKeyAndQrCodeUriAsync(ApplicationUser user)
|
||||
private async ValueTask LoadSharedKeyAndQrCodeUriAsync(IdentityUser user)
|
||||
{
|
||||
// Load the authenticator key & QR code URI to display on the form
|
||||
string? unformattedKey = await UserManager.GetAuthenticatorKeyAsync(user);
|
||||
|
||||
Reference in New Issue
Block a user