Use proper database context in new server.

This commit is contained in:
2024-05-03 22:54:50 +01:00
parent 7bcaf5b1b0
commit 67cde54e37
38 changed files with 174 additions and 869 deletions

View File

@@ -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);