mirror of
https://github.com/BookStackApp/BookStack.git
synced 2026-02-06 00:59:39 +03:00
Chrome Browser OIDC Login Fails Due to Session oidc_state Loss #5531
Open
opened 2026-02-05 10:08:57 +03:00 by OVERLORD
·
15 comments
No Branch/Tag Specified
development
further_theme_development
l10n_development
release
llm_only
vectors
v25-11
docker_env
drawio_rendering
user_permissions
ldap_host_failover
svg_image
prosemirror
captcha_example
fix/video-export
v25.12.3
v25.12.2
v25.12.1
v25.12
v25.11.6
v25.11.5
v25.11.4
v24.11.4
v25.11.3
v25.11.2
v25.11.1
v25.11
v25.07.3
v25.07.2
v25.07.1
v25.07
v25.05.2
v25.05.1
v25.05
v25.02.5
v25.02.4
v25.02.3
v25.02.2
v25.02.1
v25.02
v24.12.1
v24.12
v24.10.3
v24.10.2
v24.10.1
v24.10
v24.05.4
v24.05.3
v24.05.2
v24.05.1
v24.05
v24.02.3
v24.02.2
v24.02.1
v24.02
v23.12.3
v23.12.2
v23.12.1
v23.12
v23.10.4
v23.10.3
v23.10.2
v23.10.1
v23.10
v23.08.3
v23.08.2
v23.08.1
v23.08
v23.06.2
v23.06.1
v23.06
v23.05.2
v23.05.1
v23.05
v23.02.3
v23.02.2
v23.02.1
v23.02
v23.01.1
v23.01
v22.11.1
v22.11
v22.10.2
v22.10.1
v22.10
v22.09.1
v22.09
v22.07.3
v22.07.2
v22.07.1
v22.07
v22.06.2
v22.06.1
v22.06
v22.04.2
v22.04.1
v22.04
v22.03.1
v22.03
v22.02.3
v22.02.2
v22.02.1
v22.02
v21.12.5
v21.12.4
v21.12.3
v21.12.2
v21.12.1
v21.12
v21.11.3
v21.11.2
v21.11.1
v21.11
v21.10.3
v21.10.2
v21.10.1
v21.10
v21.08.6
v21.08.5
v21.08.4
v21.08.3
v21.08.2
v21.08.1
v21.08
v21.05.4
v21.05.3
v21.05.2
v21.05.1
v21.05
v21.04.6
v21.04.5
v21.04.4
v21.04.3
v21.04.2
v21.04.1
v21.04
v0.31.8
v0.31.7
v0.31.6
v0.31.5
v0.31.4
v0.31.3
v0.31.2
v0.31.1
v0.31.0
v0.30.7
v0.30.6
v0.30.5
v0.30.4
v0.30.3
v0.30.2
v0.30.1
v0.30.0
v0.29.3
v0.29.2
v0.29.1
v0.29.0
v0.28.3
v0.28.2
v0.28.1
v0.28.0
v0.27.5
v0.27.4
v0.27.3
v0.27.2
v0.27.1
v0.27
v0.26.4
v0.26.3
v0.26.2
v0.26.1
v0.26.0
v0.25.5
v0.25.4
v0.25.3
v0.25.2
v0.25.1
v0.25.0
v0.24.3
v0.24.2
v0.24.1
v0.24.0
v0.23.2
v0.23.1
v0.23.0
v0.22.0
v0.21.0
v0.20.3
v0.20.2
v0.20.1
v0.20.0
v0.19.0
v0.18.5
v0.18.4
v0.18.3
v0.18.2
v0.18.1
v0.18.0
v0.17.4
v0.17.3
v0.17.2
v0.17.1
v0.17.0
v0.16.3
v0.16.2
v0.16.1
v0.16.0
v0.15.3
v0.15.2
v0.15.1
v0.15.0
v0.14.3
v0.14.2
v0.14.1
v0.14.0
v0.13.1
v0.13.0
v0.12.2
v0.12.1
v0.12.0
v0.11.2
v0.11.1
v0.11.0
v0.10.0
v0.9.3
v0.9.2
v0.9.1
v0.9.0
v0.8.2
v0.8.1
v0.8.0
v0.7.6
v0.7.5
v0.7.4
v0.7.3
0.7.2
v.0.7.1
v0.7.0
v0.6.3
v0.6.2
v0.6.1
v0.6.0
v0.5.0
Labels
Clear labels
🎨 Design
📖 Docs Update
🐛 Bug
🐛 Bug
:cat2:🐈 Possible duplicate
💿 Database
☕ Open to discussion
💻 Front-End
🐕 Support
🚪 Authentication
🌍 Translations
🔌 API Task
🏭 Back-End
⛲ Upstream
🔨 Feature Request
🛠️ Enhancement
🛠️ Enhancement
🛠️ Enhancement
❤️ Happy feedback
🔒 Security
🔍 Pending Validation
💆 UX
📝 WYSIWYG Editor
🌔 Out of scope
🔩 API Request
:octocat: Admin/Meta
🖌️ View Customization
❓ Question
🚀 Priority
🛡️ Blocked
🚚 Export System
♿ A11y
🔧 Maintenance
> Markdown Editor
pull-request
Mirrored from GitHub Pull Request
Milestone
No items
No Milestone
Projects
Clear projects
No project
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: starred/BookStack#5531
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @jacac on GitHub (Dec 1, 2025).
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
oidc_statein the session.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_stateshould 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 ofoidc_state.session()->flash()only preservers it for the next request.cf847974d2/app/Access/Controllers/OidcController.php (L33)causing it to be removed before the login completes The subsequent check during the callback fails incf847974d2/app/Access/Controllers/OidcController.php (L48)Browser Details
Chrome Version 142.0.7444.176
Exact BookStack Version
v25.07.3
@ssddanbrown commented on GitHub (Dec 2, 2025):
Thanks for reporting @jacac.
I've been trying to assist someone with very similar issues, which have been hard to re-produce, so thanks for digging into this to find the cause as it's helped considerably.
At a glance, and based on timing, it's probably only arising now due to this change:
fcef1a7948Since before this would not have been part of the session.
I'll mark this as a priority, with an aim to confirm, cover with testing, and patch into a new release tomorrow.
@jacac commented on GitHub (Dec 2, 2025):
Maybe I should also mentioned that I blocked request on my proxy to
opensearch.xmlwith a404return.Steps/Experience:
Workaround:
I blocked requests to
opensearch.xmlat the proxy level (returning 404). This prevented the session from resetting to a prior state and stabilized login/logout behavior.Notes:
I could not reproduce this on Firefox.
@hwangsvb commented on GitHub (Dec 2, 2025):
Experiencing the same issue here. Tested on edge, chrome, and firefox, likely a chromium issue as it does not occur on firefox.
Issue started happening after updating from 25.07.2 to 25.07.3. An old clone of the instance running 25.07 is not having issues.
@ssddanbrown commented on GitHub (Dec 3, 2025):
Unfortunately I have not been able to replicate this on either chrome or chromium (on OpenSuse) so wonder if other factors are in play. I can see that there are frequent manifest requests in these browsers, and opensearch requests are performed with cookies (and therefore would use sessions).
Regardless, the scenario can still be manually replicated so I'll look to change the flow to instead not depend on the next response being the callback (via session flashing) but instead be more persistent yet time limited.
I'll also maybe add a little bit of caching via headers to the manifest responses just to prevent chromium browsers adding extra load via redundant repeated calls.
@ssddanbrown commented on GitHub (Dec 3, 2025):
This has now been addressed by the changes in
adfac3e30e, and these will be part of the next patch release which I'll put out within the next hour or so.Thanks again for reporting and providing input @jacac @hwangsvb.
Please let me know though if you continue to experience any issues after the update and this can be re-opened.
@hwangsvb commented on GitHub (Dec 3, 2025):
updated to 25.11.5 and issue is still happening
for a bit more context:
bookstack is running in docker on ubuntu 24.04.3 LTS
using nginx as reverse proxy
@ssddanbrown commented on GitHub (Dec 4, 2025):
@hwangsvb I'm not sure what might be going wrong for you then.
Having issues from 25.07.3 would indicate that it was due to the manifest requests, since there were little other changes in that release. But those should really not interfere with the login flow with the new changes. Are you confident you're running v25.11.5? (just checking since you mentioned docker since docker-based releases can be delayed).
@hwangsvb commented on GitHub (Dec 4, 2025):
yes, can confirm running 25.11.5 using this image: https://hub.docker.com/layers/linuxserver/bookstack/version-v25.11.5/images/sha256-da5e49f7e867fd20a6c6e554eeaa017228c6788f63f19ff71fd46758cb1113fa
@jacac commented on GitHub (Dec 5, 2025):
@hwangsvb Could you try blocking
opensearch.xmlin Nginx and delete all browsing data and see if you are still getting it?Something like:
location ~ /opensearch.xml { return 404; }@hwangsvb commented on GitHub (Dec 9, 2025):
@jacac have just tested and for me blocking manifest.json is what resolves the issue.
@igittigitt commented on GitHub (Dec 9, 2025):
I also got the same problem when trying to implement an alternative "Auto Login" by an URL parameter (?autologin=true). We had this requirement due to the fact that we like to provide public information without any login, but also internal information where a SSO login is required. For the convenience of our users we provide a link to the BookStack instance having the above param added and so they should be "in" automatically (as we also use Kerberos integration in out Browsers and Keycloak SSO).
That worked, but only by adding a short timeout of 200 ms or more bewett detecting the login-page and submitting the login-button form. We run BS 25.11.3
@ssddanbrown commented on GitHub (Dec 9, 2025):
@hwangsvb @igittigitt Could I confirm your URL setup. Are you hosting your instance on a URL sub-path? Or is the instance at the root of the domain/sub-domain?
Do you have any
SESSION_*options configured in your BookStack env config? If so, which?@jacac Is this fixed for you without blocking requests, or does the issue remain?
@igittigitt commented on GitHub (Dec 9, 2025):
@ssddanbrown sorry, i should have made a better userstory, so i corrected it afterwards. After updating to 25.11.5 it was much more stable. No more "manifest.json" and the submit-timeout could be set down to 100 ms (maybe less, but that was ok for us) and is now works all the time.
I think when i send the form too fast, the internal system has not fully written the session data into the DB and the subsequent request runs into an undefined status.
For all who might want to do something similar, this is my Javascript code i've added in the customization page of BookStack:
If you now call https://mybookstack.domain/login?autologin=true you get logged in like with "AUTH_AUTO_INITIATE=true" but only by using this parameter. If an (public) user get to BookStack, he will stay there and not get redirected to SSO. Maybe this is something i should create a feature-request for? To add another option which is only logging in users who click on the upper right login-button, but not if he is just visiting the page?
And no, i did not set any SESSION_* options. Do you suggest so, and if, which?
@hwangsvb commented on GitHub (Dec 9, 2025):
@ssddanbrown root of subdomain. no session_* options.
@Tomblarom commented on GitHub (Dec 10, 2025):
I'm the
someone with very similar issuesand updating to v25.11.6 solved it. 😉 I tested with Chrome+Firefox. The login now succeeds every time and never shows this error message:I noticed that it only briefly shows it, when I refresh the page and leave
/oidc/callback?code=[..]in the URL. But the login still succeeds. Without thecallback-code, it never shows the error message.Note: by succeed I mean, it shows the dump, because I currently have
OIDC_DUMP_USER_DETAILS=true.