feat: fix incorrect JWT cookie key

This commit is contained in:
GW_MC
2025-12-20 16:40:41 +08:00
parent 3f252a8abd
commit be63fcbc37
2 changed files with 8 additions and 2 deletions

View File

@@ -7,6 +7,7 @@ use axum::{
response::Response,
};
use axum_extra::extract::cookie::CookieJar;
use tracing::debug;
use uuid::Uuid;
use crate::{
@@ -25,6 +26,7 @@ pub async fn require_auth(
let token = if let Some(cookie) = cookies.get(JWT_COOKIE_NAME) {
cookie.value().to_string()
} else {
debug!("No JWT cookie found. cookies: {:?}", cookies);
return handle_unauthenticated().await;
};