docs(ui.md): add docs on self serve ui flow

This commit is contained in:
Krrish Dholakia 2024-01-01 18:25:41 +05:30
parent 9cb5a2bec0
commit 95f850fecc
5 changed files with 63 additions and 6 deletions

View file

@ -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}
)