diff --git a/client/app/factory/list/page.tsx b/client/app/factory/list/page.tsx index b7ec3c75..67ecc1c0 100644 --- a/client/app/factory/list/page.tsx +++ b/client/app/factory/list/page.tsx @@ -23,7 +23,7 @@ export default function List() { } return ( -
+
diff --git a/client/app/page.tsx b/client/app/page.tsx index 6c2277f4..2e1c250c 100644 --- a/client/app/page.tsx +++ b/client/app/page.tsx @@ -39,7 +39,7 @@ export default function Home() { return (
-
+
{!isEmpty(bots) && diff --git a/server/main.py b/server/main.py index 4d9bc930..2f62c392 100644 --- a/server/main.py +++ b/server/main.py @@ -20,7 +20,6 @@ is_dev = bool(get_env_variable("IS_DEV")) session_secret_key = get_env_variable("FASTAPI_SECRET_KEY") cors_origins_whitelist = get_env_variable("CORS_ORIGIN_WHITELIST") or '' - app = FastAPI( title="Bo-meta Server", version="1.0", diff --git a/server/routers/auth.py b/server/routers/auth.py index 9a60124a..a603a10f 100644 --- a/server/routers/auth.py +++ b/server/routers/auth.py @@ -58,7 +58,6 @@ async def getAnonymousUser(request: Request, response: Response): @router.get("/login") def login(): - print(f'redirect_uri={CALLBACK_URL}') redirect_uri = f"https://{AUTH0_DOMAIN}/authorize?audience={API_AUDIENCE}&response_type=code&client_id={CLIENT_ID}&redirect_uri={CALLBACK_URL}&scope=openid profile email&state=STATE" return RedirectResponse(redirect_uri) @@ -68,8 +67,9 @@ async def callback(request: Request, response: Response): if not code: raise HTTPException(status_code=status.HTTP_401_UNAUTHORIZED, detail="Missing authorization code") token = await getTokenByCode(code) + if not token: + raise HTTPException(status_code=status.HTTP_401_UNAUTHORIZED, detail="Missing authorization token") data = await getUserInfoByToken(token) - supabase = get_client() supabase.table("profiles").upsert(data).execute() response = RedirectResponse(url=f'{WEB_URL}', status_code=302)