diff --git a/IRaCIS.Core.IdentityServer4/Account/AuthenticateController.cs b/IRaCIS.Core.IdentityServer4/Account/AuthenticateController.cs index bb06623d..4f1924b8 100644 --- a/IRaCIS.Core.IdentityServer4/Account/AuthenticateController.cs +++ b/IRaCIS.Core.IdentityServer4/Account/AuthenticateController.cs @@ -47,8 +47,8 @@ namespace IRaCIS.Core.IdentityServer4.Account var a = "/connect/authorize/callback?client_id=spa&redirect_uri=http%3A%2F%2Flocalhost%3A8081%2Fcallback.html&response_type=code&scope=openid%20%20profile&state=05d78e28fabf4af889f408123cfd6109&code_challenge=DmFSo8DgWoL7J9rT5BLPHwIWeAKJWKGR_ZYmxCaWmEw&code_challenge_method=S256&display=popup"; var context = await _interaction.GetAuthorizationContextAsync(request.ReturnUrl); - var user = _userRepository - .FirstOrDefault(usr => usr.Password == request.Password && usr.UserName == request.UserName); + var user = await _userRepository + .FirstOrDefaultAsync(usr => usr.Password == request.Password && usr.UserName == request.UserName); if (user != null && context != null) {