1
0
forked from baron/baron-sso

fix: clear stale auth flags and improve user name fallback logic (#637)

- Clear AuthTokenStore in _silentSessionRecovery when session is invalid (Case 2)

- Use .trim().isNotEmpty for userName fallback to handle empty strings (Case 1)
This commit is contained in:
2026-04-28 11:33:40 +09:00
parent 08aa745e30
commit bbf29bf400
2 changed files with 9 additions and 5 deletions

View File

@@ -104,11 +104,13 @@ Future<void> _silentSessionRecovery() async {
_log.info("[SessionRecovery] Recovery complete. Subject: $subject");
} else {
_log.warning("[SessionRecovery] Session found but subject is empty.");
AuthTokenStore.clear();
}
} catch (e) {
_log.info(
"[SessionRecovery] No valid cookie session found or request failed: $e",
);
AuthTokenStore.clear();
}
}