diff --git a/Security/Services/AuthService.cs b/Security/Services/AuthService.cs index 9542249..58d439b 100644 --- a/Security/Services/AuthService.cs +++ b/Security/Services/AuthService.cs @@ -86,4 +86,14 @@ public class AuthService(ICacheService cache, IAccessToken accessTokenService, I RefreshToken = GenerateRefreshToken() }; } + + public async Task LogoutAsync(string fingerprint, CancellationToken cancellation = default) + { + var authTokenStruct = await cache.GetAsync(GetAuthCacheKey(fingerprint), cancellation); + if (authTokenStruct == null) return; + + await RevokeAccessToken(authTokenStruct.AccessToken); + + await cache.RemoveAsync(fingerprint, cancellation); + } } \ No newline at end of file