File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -131,10 +131,18 @@ export class SolidAuthnLogic implements AuthnLogic {
131131 await withRestoreTimeout ( sessionAny . restore ( ) )
132132 } catch ( error ) {
133133 const message = error instanceof Error ? error . message : String ( error )
134- if ( ! / n o s e s s i o n t o r e s t o r e / i. test ( message ) ) {
134+ // A failed restore on an inactive session just means "no usable
135+ // session to restore" — whether that's "No session to restore.",
136+ // a stale refresh token / dead client_id returning HTTP 400, or a
137+ // missing session database. Never let it block the login UI: log
138+ // and continue as logged-out so the page renders the login button.
139+ // Only re-throw when the session actually became active, which is
140+ // an unexpected refresh failure worth surfacing.
141+ const isNowActive = sessionAny ?. isActive ?? Boolean ( sessionAny ?. webId )
142+ if ( isNowActive && ! / n o s e s s i o n t o r e s t o r e / i. test ( message ) ) {
135143 throw error
136144 }
137- debug . log ( 'No previous session to restore' )
145+ debug . log ( `Session restore failed, continuing logged-out: ${ message } ` )
138146 }
139147 const isNowActive = sessionAny ?. isActive ?? Boolean ( sessionAny ?. webId )
140148 if ( ! wasActive && isNowActive ) {
You can’t perform that action at this time.
0 commit comments