From 6c65e97e49d1d56380aa7d71abb0394b08ff60ca Mon Sep 17 00:00:00 2001 From: Owen Jacobson Date: Sun, 24 Aug 2025 16:00:45 -0400 Subject: Return an identity, rather than the parts of an identity, when validating an identity token. This is a small refactoring that's been possible for a while, and we only just noticed. --- src/user/handlers/logout/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/user/handlers/logout') diff --git a/src/user/handlers/logout/mod.rs b/src/user/handlers/logout/mod.rs index 4450e4c..f759451 100644 --- a/src/user/handlers/logout/mod.rs +++ b/src/user/handlers/logout/mod.rs @@ -21,8 +21,8 @@ pub async fn handler( Json(_): Json, ) -> Result<(IdentityCookie, Empty), Error> { if let Some(secret) = identity.secret() { - let (token, _) = app.tokens().validate(&secret, &now).await?; - app.tokens().logout(&token).await?; + let validated_ident = app.tokens().validate(&secret, &now).await?; + app.tokens().logout(&validated_ident.token).await?; } let identity = identity.clear(); -- cgit v1.2.3