forked from phoenix/litellm-mirror
docs(ui.md): add okta sso support to docs
This commit is contained in:
parent
c9bb4b29c7
commit
a8ea7c6d31
6 changed files with 25 additions and 5 deletions
|
@ -77,6 +77,28 @@ litellm_settings:
|
|||
|
||||
#### Step 2: Setup Oauth Client
|
||||
<Tabs>
|
||||
<TabItem value="okta" label="Okta SSO">
|
||||
|
||||
1. Add Okta credentials to your .env
|
||||
|
||||
```bash
|
||||
GENERIC_CLIENT_ID = "<your-okta-client-id>"
|
||||
GENERIC_CLIENT_SECRET = "<your-okta-client-secret>"
|
||||
GENERIC_AUTHORIZATION_ENDPOINT = "<your-okta-domain>/authorize" # https://dev-2kqkcd6lx6kdkuzt.us.auth0.com/authorize
|
||||
GENERIC_TOKEN_ENDPOINT = "<your-okta-domain>/token" # https://dev-2kqkcd6lx6kdkuzt.us.auth0.com/oauth/token
|
||||
GENERIC_USERINFO_ENDPOINT = "<your-okta-domain>/userinfo" # https://dev-2kqkcd6lx6kdkuzt.us.auth0.com/userinfo
|
||||
```
|
||||
|
||||
You can get your domain specific auth/token/userinfo endpoints at `<YOUR-OKTA-DOMAIN>/.well-known/openid-configuration`
|
||||
|
||||
2. Add proxy url as callback_url on Okta
|
||||
|
||||
On Okta, add the 'callback_url' as `<proxy_base_url>/sso/callback`
|
||||
|
||||
|
||||
<Image img={require('../../img/okta_callback_url.png')} />
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="google" label="Google SSO">
|
||||
|
||||
- Create a new Oauth 2.0 Client on https://console.cloud.google.com/
|
||||
|
@ -115,7 +137,6 @@ MICROSOFT_TENANT="5a39737
|
|||
|
||||
</TabItem>
|
||||
|
||||
|
||||
<TabItem value="Generic" label="Generic SSO Provider">
|
||||
|
||||
A generic OAuth client that can be used to quickly create support for any OAuth provider with close to no code
|
||||
|
|
BIN
docs/my-website/img/okta_callback_url.png
Normal file
BIN
docs/my-website/img/okta_callback_url.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 279 KiB |
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -13070,7 +13070,9 @@ async def auth_callback(request: Request):
|
|||
user_role = getattr(result, generic_user_role_attribute_name, None)
|
||||
|
||||
if user_id is None:
|
||||
user_id = getattr(result, "first_name", "") + getattr(result, "last_name", "")
|
||||
_first_name = getattr(result, "first_name", "") or ""
|
||||
_last_name = getattr(result, "last_name", "") or ""
|
||||
user_id = _first_name + _last_name
|
||||
|
||||
user_info = None
|
||||
user_id_models: List = []
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue