From bfc36f3c6a4da0f86c37ec3ba90632c3d0675519 Mon Sep 17 00:00:00 2001 From: sargon64 Date: Wed, 26 Jul 2023 21:57:13 -0700 Subject: [PATCH] fix: remove set-cookie header --- src/users.rs | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/users.rs b/src/users.rs index 185f065..057186b 100644 --- a/src/users.rs +++ b/src/users.rs @@ -208,16 +208,7 @@ pub async fn user_auth( let jwt = JWTAuth::new(user).encode(*KEY.clone()); - let mut res = HttpResponse::Ok(); - res.cookie( - actix_web::cookie::Cookie::build("jwt", jwt) - .path("/") - .secure(true) - .http_only(true) - .finish(), - ); - - res.finish() + HttpResponse::Ok().json(json!({ "jwt": jwt })) } #[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]