diff --git a/Endpoint/Controllers/V1/AuthController.cs b/Endpoint/Controllers/V1/AuthController.cs index 71dd6c3..f02cf76 100644 --- a/Endpoint/Controllers/V1/AuthController.cs +++ b/Endpoint/Controllers/V1/AuthController.cs @@ -40,11 +40,17 @@ public class AuthController(IOptionsSnapshot user, AuthService auth, Pass Response.Cookies.Append(name, value, cookieOptions); } - private void SetRefreshToken(string value, DateTimeOffset? expires = null) => + private void SetRefreshToken(string value, DateTimeOffset? expires = null) + { SetCookie("refresh_token", value, expires); + SetCookie("user_key", Fingerprint, expires); + } - private void SetFirstToken(string value, DateTimeOffset? expires = null) => + private void SetFirstToken(string value, DateTimeOffset? expires = null) + { SetCookie("authentication_token", value, expires); + SetCookie("user_key", Fingerprint, expires); + } [ApiExplorerSettings(IgnoreApi = true)] public void OnActionExecuting(ActionExecutingContext context) @@ -57,7 +63,6 @@ public class AuthController(IOptionsSnapshot user, AuthService auth, Pass if (!string.IsNullOrWhiteSpace(Fingerprint)) return; Fingerprint = Guid.NewGuid().ToString().Replace("-", ""); - SetCookie("user_key", Fingerprint); } [ApiExplorerSettings(IgnoreApi = true)]