refactor: change int to string for Id
This commit is contained in:
parent
c5ba1cfcca
commit
1b24954c3e
@ -8,7 +8,7 @@ public enum TwoFactorAuthenticator
|
||||
|
||||
public class User
|
||||
{
|
||||
public required int Id { get; set; }
|
||||
public required string Id { get; set; }
|
||||
public required string Username { get; set; }
|
||||
public required string Email { get; set; }
|
||||
public required string PasswordHash { get; set; }
|
||||
|
@ -131,13 +131,13 @@ public class AuthService(ICacheService cache, IAccessToken accessTokenService, I
|
||||
|
||||
if (user.TwoFactorAuthenticator == TwoFactorAuthenticator.None)
|
||||
{
|
||||
await GenerateAuthTokensAsync(cookieOptions, context, requestContext, user.Id.ToString(), cancellation);
|
||||
await GenerateAuthTokensAsync(cookieOptions, context, requestContext, user.Id, cancellation);
|
||||
return TwoFactorAuthenticator.None;
|
||||
}
|
||||
|
||||
var firstAuthToken = new FirstAuthToken(requestContext)
|
||||
{
|
||||
UserId = user.Id.ToString(),
|
||||
UserId = user.Id,
|
||||
Secret = user.SecondFactorToken,
|
||||
TwoFactorAuthenticator = user.TwoFactorAuthenticator
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user