mirror of
https://github.com/arsvendg/Stirling-PDF.git
synced 2026-07-15 19:10:47 +02:00
Fix login loop on self-hosted desktop (#5022)
# Description of Changes Fix #5017 Changes the handling of jwt tokens to be stored in local storage as well as OS keyring so the rest of the app knows that you're logged in.
This commit is contained in:
@@ -161,8 +161,8 @@ class SpringAuthClient {
|
||||
return { data: { session: null }, error: null };
|
||||
}
|
||||
|
||||
// Clear potentially invalid token on other errors too
|
||||
localStorage.removeItem('stirling_jwt');
|
||||
// Don't clear token for other errors (e.g., backend not ready, network issues)
|
||||
// The token is still valid, just can't verify it right now
|
||||
return {
|
||||
data: { session: null },
|
||||
error: { message: getErrorMessage(error, 'Unknown error') },
|
||||
|
||||
Reference in New Issue
Block a user