-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Description
Describe the Bug
When logging in to BookStack using OpenID Connect (OIDC) in the Chrome browser, the login process fails and loops between BookStack and the OIDC provider. After a few loops the login succeeds.
Steps to Reproduce
- Configure BookStack with OIDC authentication.
- Open Bookstack.
- Observe the session state in the session store (Redis in my case)
- Click on the login button.
- Observe the
oidc_statein the session. - After a few seconds observer the
oidc_state. It was missing for me.
Expected Behaviour
The OIDC login flow should complete successfully in Chrome without being interrupted by unrelated or failing resource requests. The oidc_state should be preserved until the authentication process is finalized.
Screenshots or Additional Context
The issue occurs because Chrome triggers additional requests (such as manifest.json, opensearch.xml, and even 404 requests like /dist/app.js.map (if DevTools are open) during the login flow. These requests interfere with the session handling of oidc_state. session()->flash() only preservers it for the next request.
| session()->flash('oidc_state', $loginDetails['state']); |
| $this->showErrorNotification(trans('errors.oidc_fail_authed', ['system' => config('oidc.name')])); |
Browser Details
Chrome Version 142.0.7444.176
Exact BookStack Version
v25.07.3