Loading
fix: prevent login redirect loop caused by StrictMode double sign-in
fix: prevent login redirect loop caused by StrictMode double sign-in
Under React StrictMode the sign-in redirect was triggered twice, generating two PKCE verifier/state pairs and overwriting the ones in sessionStorage. The browser navigated using the first request's state while storage held the second, so the auth callback's state check failed and re-triggered sign-in, producing a login loop.
- Guard AuthAdapter.startOidcSignIn against concurrent redirects so a second call cannot overwrite the stored PKCE verifier/state (resets on error to allow retry).
- Move the signIn() side effect in ProtectedRoute out of the render body into a useEffect.