docs: Fix the "Could not open websocket" / multiple-accounts OAuth troubleshooting - #8637
Merged
Merged
Conversation
… issue The OAuth troubleshooting guide attributed 'Could not open websocket' to 'multiple accounts' and recommended incognito/clearing cookies. The real cause is almost always request-header size: the Sec-WebSocket-Protocol session token embeds the OAuth cookies and exceeds the proxy's per-header buffer (nginx large_client_header_buffers, default 8KB), so the upgrade is rejected before reaching the server. - Rewrite the troubleshooting section to explain the real cause, how to diagnose it, and the real fixes (raise the proxy request-header buffer incl. the ingress-nginx ConfigMap caveat, --exclude-cookies, reduce token size, drop encryption key). - Add a 'note on multiple accounts' clarifying they don't enlarge app request headers, and document oauth_extra_params prompt=select_account for controlling account selection. - Document the same prompt/multiple-account guidance in the Azure provider docs. Refs #8634, #7909. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
philippjfr
approved these changes
Jun 5, 2026
philippjfr
approved these changes
Jun 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Addresses the documentation half of #8634 ("Azure OAuth not working with multiple accounts").
The OAuth troubleshooting guide currently attributes the "Could not open websocket" failure to "multiple accounts" and recommends incognito / clearing cookies / a different browser. Investigation of #8634 shows that description is misleading:
Sec-WebSocket-Protocolheader on the/wsupgrade. When that header exceeds the proxy's per-request-header buffer (nginxlarge_client_header_buffers, default 8 KB) the proxy returnsHTTP 400and the upgrade never reaches the Panel server.Changes
doc/how_to/authentication/trouble_shooting.mdnet-export, theHTTP 400, theSec-WebSocket-Protocol/Cookieheader sizes), and real fixes:Ingressannotation);--exclude-cookies access_token id_token refresh_token(with thepn.state.*tradeoff);promptfor controlling account selection.doc/how_to/authentication/providers/azure.mdoauth_extra_paramsprompt=select_account/prompt=login(enabled by Forward additionaloauth_extra_paramsto the OAuth authorization endpoint #8635), with a note thatCould not open websocketis a header-size issue rather than an account issue.Related
oauth_extra_paramsto the OAuth authorization endpoint #8635 makespromptactually reach the authorize endpoint (referenced from the new Azure docs).🤖 Generated with Claude Code