Update main.py
Browse files
main.py
CHANGED
@@ -59,8 +59,9 @@ async def login_post(
|
|
59 |
)
|
60 |
|
61 |
# Redirect the user to the protected route with the token in the URL
|
62 |
-
url = app.url_path_for("get_protected") # Ensure you have a name="get_protected" in your app.get("/protected") decorator
|
63 |
-
return RedirectResponse(f"
|
|
|
64 |
|
65 |
#response = RedirectResponse(url="/protected", status_code=status.HTTP_303_SEE_OTHER)
|
66 |
#response.set_cookie(key="access_token", value=f"Bearer {access_token}", httponly=True)
|
|
|
59 |
)
|
60 |
|
61 |
# Redirect the user to the protected route with the token in the URL
|
62 |
+
#url = app.url_path_for("get_protected") # Ensure you have a name="get_protected" in your app.get("/protected") decorator
|
63 |
+
return RedirectResponse(url=f"/protected?token={access_token}")
|
64 |
+
#return RedirectResponse(f"{url}?token={access_token}")
|
65 |
|
66 |
#response = RedirectResponse(url="/protected", status_code=status.HTTP_303_SEE_OTHER)
|
67 |
#response.set_cookie(key="access_token", value=f"Bearer {access_token}", httponly=True)
|