forked from phoenix/litellm-mirror
docs(ui.md): add docs on self serve ui flow
This commit is contained in:
parent
9cb5a2bec0
commit
95f850fecc
5 changed files with 63 additions and 6 deletions
|
@ -76,12 +76,17 @@ def auth_page(page_param: str):
|
|||
else:
|
||||
post_endpoint = f"{decoded_params['proxy_url']}/user/auth"
|
||||
|
||||
try:
|
||||
assert email.split("@")[1] in decoded_params["accepted_email_subdomain"]
|
||||
except:
|
||||
raise Exception(
|
||||
f"Only emails from {decoded_params['accepted_email_subdomain']} are allowed"
|
||||
)
|
||||
if (
|
||||
decoded_params["accepted_email_subdomain"] == "*"
|
||||
): # if user wants to allow all emails
|
||||
pass
|
||||
else:
|
||||
try:
|
||||
assert email.split("@")[1] in decoded_params["accepted_email_subdomain"]
|
||||
except:
|
||||
raise Exception(
|
||||
f"Only emails from {decoded_params['accepted_email_subdomain']} are allowed"
|
||||
)
|
||||
response = requests.post(
|
||||
post_endpoint, json={"user_email": email, "page": page_param}
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue