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.
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.
Originally created by @choskeli on GitHub (Apr 28, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/13307
Check Existing Issues
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:
Alternatives Considered
No response
Additional Context
I would implement a pull request for this if it will be accepted.