diff options
-rw-r--r-- | VPNAuth.Server/Api/OAuth2.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/VPNAuth.Server/Api/OAuth2.cs b/VPNAuth.Server/Api/OAuth2.cs index bed5110..b73b17b 100644 --- a/VPNAuth.Server/Api/OAuth2.cs +++ b/VPNAuth.Server/Api/OAuth2.cs @@ -65,7 +65,7 @@ public static class OAuth2 using var db = new Database.Database(); var authRequest = db.AuthRequests - .Where(request => request.Code == context.Request.Form["code"].ToString()) + .Where(request => request.Code == context.Request.Form["code"]) .ToList() .FirstOrDefault(); if (authRequest == null) @@ -104,7 +104,7 @@ public static class OAuth2 { AccessToken = accessTokenEntry.Entity.Token, TokenType = "Bearer", - Expires = 0 // TODO: change to actual value + ExpiresIn = 604800 // 7 days }); } } |