[GH-ISSUE #13307] feat: Support Multiple OAuth redirect URIs #16878

Closed
opened 2026-04-19 22:42:26 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @choskeli on GitHub (Apr 28, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/13307

Check Existing Issues

  • I have searched the existing issues and discussions.

Problem Description

I want to support two different URLs for my open-webui site when using Okta, but redirect_uri can only be set to a single value currently.

Desired Solution you'd like

Allow the user to define a map of URL to redirect URL and have that supersede the redirect_url. Something like this in oauth.py:

        # Get the current request hostname
        request_host = request.url.hostname

        # Check if provider has a redirect_uri_list mapping hostnames to appropriate redirect URIs
        redirect_uri_list = OAUTH_PROVIDERS[provider].get("redirect_uri_list", {})
        
        if redirect_uri_list and request_host in redirect_uri_list:
            # Use the configured redirect URI for this specific hostname
            redirect_uri = redirect_uri_list[request_host]
            log.info(f"Using host-specific redirect URI for {request_host}: {redirect_uri}")

Alternatives Considered

No response

Additional Context

I would implement a pull request for this if it will be accepted.

Originally created by @choskeli on GitHub (Apr 28, 2025). Original GitHub issue: https://github.com/open-webui/open-webui/issues/13307 ### Check Existing Issues - [x] I have searched the existing issues and discussions. ### Problem Description I want to support two different URLs for my open-webui site when using Okta, but redirect_uri can only be set to a single value currently. ### Desired Solution you'd like Allow the user to define a map of URL to redirect URL and have that supersede the redirect_url. Something like this in oauth.py: ``` # Get the current request hostname request_host = request.url.hostname # Check if provider has a redirect_uri_list mapping hostnames to appropriate redirect URIs redirect_uri_list = OAUTH_PROVIDERS[provider].get("redirect_uri_list", {}) if redirect_uri_list and request_host in redirect_uri_list: # Use the configured redirect URI for this specific hostname redirect_uri = redirect_uri_list[request_host] log.info(f"Using host-specific redirect URI for {request_host}: {redirect_uri}") ``` ### Alternatives Considered _No response_ ### Additional Context I would implement a pull request for this if it will be accepted.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#16878