only save (encrypted) user_id in cookie

This commit is contained in:
2023-07-27 22:16:12 +02:00
parent b5fd4018ff
commit 16a0654e1f
2 changed files with 9 additions and 6 deletions

View File

@@ -79,8 +79,7 @@ async fn login(
}
};
let user_json: String = format!("{}", json!(user));
cookies.add_private(Cookie::new("loggedin_user", user_json));
cookies.add_private(Cookie::new("loggedin_user", format!("{}", json!(user.id))));
Log::create(
db,