Update app.py
Browse files
app.py
CHANGED
@@ -292,7 +292,7 @@ async def register_post(
|
|
292 |
# Create an access token
|
293 |
access_token = create_access_token(data={"sub": registered_user.email})
|
294 |
# Redirect to the protected route
|
295 |
-
response = RedirectResponse(url="/
|
296 |
response.set_cookie(key="access_token", value=f"Bearer {access_token}", httponly=True)
|
297 |
return response
|
298 |
except HTTPException as e:
|
|
|
292 |
# Create an access token
|
293 |
access_token = create_access_token(data={"sub": registered_user.email})
|
294 |
# Redirect to the protected route
|
295 |
+
response = RedirectResponse(url="/protected")
|
296 |
response.set_cookie(key="access_token", value=f"Bearer {access_token}", httponly=True)
|
297 |
return response
|
298 |
except HTTPException as e:
|