Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -38,19 +38,7 @@ import chainlit as cl
|
|
| 38 |
print(os.getenv("OPENID_PROVIDER_URL"))
|
| 39 |
print(os.getenv("OAUTH_CLIENT_ID"))
|
| 40 |
|
| 41 |
-
|
| 42 |
-
@cl.oauth_callback
|
| 43 |
-
def oauth_callback(
|
| 44 |
-
provider_id: str,
|
| 45 |
-
token: str,
|
| 46 |
-
raw_user_data: Dict[str, str],
|
| 47 |
-
default_user: cl.User,
|
| 48 |
-
) -> Optional[cl.User]:
|
| 49 |
-
if provider_id == "google":
|
| 50 |
-
if raw_user_data["hd"] == "example.org":
|
| 51 |
-
return default_user
|
| 52 |
-
return None
|
| 53 |
-
|
| 54 |
|
| 55 |
@cl.on_chat_start
|
| 56 |
async def on_chat_start():
|
|
|
|
| 38 |
print(os.getenv("OPENID_PROVIDER_URL"))
|
| 39 |
print(os.getenv("OAUTH_CLIENT_ID"))
|
| 40 |
|
| 41 |
+
print(os.getenv("OAUTH_SCOPES"))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 42 |
|
| 43 |
@cl.on_chat_start
|
| 44 |
async def on_chat_start():
|