diff options
| author | Daniel Hader <[email protected]> | 2026-05-30 12:59:21 -0500 |
|---|---|---|
| committer | Daniel Hader <[email protected]> | 2026-05-30 12:59:21 -0500 |
| commit | bcff4d006a0600ecf86f18ecdaa74e0df31766f0 (patch) | |
| tree | 5889f48f0c7d348d0bfe6240ab5136cd710d4ce4 /src/routes | |
| parent | 929be68e691c1c4015fc6874111b19b9f5d68c02 (diff) | |
hardened login / logout flow
Diffstat (limited to 'src/routes')
| -rw-r--r-- | src/routes/auth.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/routes/auth.rs b/src/routes/auth.rs index 979e617..ab7a393 100644 --- a/src/routes/auth.rs +++ b/src/routes/auth.rs @@ -111,6 +111,12 @@ pub async fn login( Ok(jar.add(cookie)) } +pub async fn logout( + jar: CookieJar, +) -> Result<impl IntoResponse, RouteError> { + Ok(jar.remove(Cookie::from("token"))) +} + #[cfg(test)] mod tests { use super::*; |
