From 8798c8999d186919fe4b2f6a4e4a681a6af5ead5 Mon Sep 17 00:00:00 2001 From: john Date: Sun, 1 Jun 2025 23:38:09 +0200 Subject: [PATCH] change something --- Femto.Api/Auth/SessionAuthenticationHandler.cs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Femto.Api/Auth/SessionAuthenticationHandler.cs b/Femto.Api/Auth/SessionAuthenticationHandler.cs index aa549d9..f98ae8d 100644 --- a/Femto.Api/Auth/SessionAuthenticationHandler.cs +++ b/Femto.Api/Auth/SessionAuthenticationHandler.cs @@ -45,11 +45,9 @@ internal class SessionAuthenticationHandler( var user = await authService.GetUserWithId(session.UserId); - if (user is null) + if (user is null) { - await authService.DeleteSession(sessionId); - this.Context.DeleteSession(); - return AuthenticateResult.Fail("invalid session"); + return await FailAndDeleteSession(sessionId); } if (session.ExpiresSoon)