Fix login
All checks were successful
Build and Push Image / build-and-push (push) Successful in 5m23s
All checks were successful
Build and Push Image / build-and-push (push) Successful in 5m23s
This commit is contained in:
@@ -14,8 +14,9 @@ using Aoba.RPC;
|
||||
|
||||
namespace AobaServer.Services;
|
||||
|
||||
public class AobaAuthService(AccountsService accountsService, AuthInfo authInfo) : AuthRpc.AuthRpcBase
|
||||
public class AobaAuthService(AccountsService accountsService, AuthConfigService authConfig) : AuthRpc.AuthRpcBase
|
||||
{
|
||||
[AllowAnonymous]
|
||||
public override async Task<LoginResponse> Login(Credentials request, ServerCallContext context)
|
||||
{
|
||||
var user = await accountsService.VerifyLoginAsync(request.User, request.Password, context.CancellationToken);
|
||||
@@ -27,6 +28,7 @@ public class AobaAuthService(AccountsService accountsService, AuthInfo authInfo)
|
||||
Message = "Invalid login credentials"
|
||||
}
|
||||
};
|
||||
var authInfo = await authConfig.GetDefaultAuthInfoAsync();
|
||||
var token = user.GetToken(authInfo);
|
||||
return new LoginResponse
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user