This commit is contained in:
@@ -14,23 +14,14 @@ namespace Auth.Controllers {
|
||||
_databaseService = databaseService;
|
||||
}
|
||||
|
||||
public static void SignIn(HttpResponse Response, bool StayLoggedIn, string jwt) {
|
||||
if (StayLoggedIn) {
|
||||
// Stay logged in cookie
|
||||
Response.Cookies.Append(AuthJWT.TokenName, jwt, new CookieOptions {
|
||||
Secure = true,
|
||||
HttpOnly = true,
|
||||
SameSite = SameSiteMode.Strict,
|
||||
Expires = DateTime.UtcNow.AddDays(7)
|
||||
});
|
||||
} else {
|
||||
// Session cookie
|
||||
Response.Cookies.Append(AuthJWT.TokenName, jwt, new CookieOptions {
|
||||
Secure = true,
|
||||
HttpOnly = true,
|
||||
SameSite = SameSiteMode.Strict,
|
||||
});
|
||||
}
|
||||
public static void SignIn(HttpResponse Response, string jwt) {
|
||||
// Stay logged in cookie
|
||||
Response.Cookies.Append(AuthJWT.TokenName, jwt, new CookieOptions {
|
||||
Secure = true,
|
||||
HttpOnly = true,
|
||||
SameSite = SameSiteMode.Strict,
|
||||
Expires = DateTime.UtcNow.AddDays(7)
|
||||
});
|
||||
}
|
||||
|
||||
public static void SignOut(HttpResponse Response) {
|
||||
|
||||
Reference in New Issue
Block a user