diff --git a/src/auth/mod.rs b/src/auth/mod.rs index 3629e48..0b62af7 100644 --- a/src/auth/mod.rs +++ b/src/auth/mod.rs @@ -18,10 +18,10 @@ impl<'r> FromRequest<'r> for User { async fn from_request(req: &'r Request<'_>) -> Outcome { // get the session id from the cookie - let session_opt = req.cookies().get("rocket_session_id"); + let session_opt = req.cookies().get_private("rocket_session_id"); let session_id_str = match session_opt { - Some(s) => s.value(), + Some(s) => s.value().to_owned(), None => return Outcome::Error((Status::Unauthorized, ())), };