mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 10:58:17 -05:00
[GH-ISSUE #17178] feat: Add a way to set OAuth response_mode and handle large groups claim (AD FS + allatclaims)
#56862
Reference in New Issue
Block 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 @m20l22 on GitHub (Sep 3, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/17178
Check Existing Issues
Problem Description
I’m running Open WebUI with Microsoft AD FS as the OIDC provider and I use OAuth Group Management by emitting a
groupsclaim (enabled via the AD FSallatclaimsscope). In practice, AD FS +allatclaimsworks and users can authenticate successfully, and Open WebUI reads groups on login.However, when a user belongs to many groups, the resulting ID/access token (with the
groupsclaim) becomes large. Open WebUI appears to store token data in a cookie, and for users with a largegroupsclaim this exceeds common browser cookie size limits. The net effect is:Separately, Microsoft’s guidance for AD FS when customizing ID tokens (e.g., to include extra claims like
groups) requires usingresponse_mode=form_post. Open WebUI currently has no configuration/env var to setresponse_mode, so AD FS deployments can’t explicitly chooseform_post.Desired Solution you'd like
response_mode: Add an environment variable (and/or admin setting) to control the OIDC authorization requestresponse_mode. Example:OAUTH_RESPONSE_MODE=form_post|query|fragmentresponse_mode=<value>on the/authorizerequest.groupsclaim on login instead of relying on a large ID/access token in the cookie.Either (2a), (2b), or (2c) would prevent group sync from silently failing when the
groupsclaim is large.Alternatives Considered
Additional Context
@tjbck commented on GitHub (Sep 8, 2025):
Addressed with
217f4daef0