Gregniuki commited on
Commit
4fc11e1
·
1 Parent(s): 3ec2cd6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -255,7 +255,7 @@ async def verify_email(token: str, db: Session = Depends(get_db)):
255
  access_token = create_access_token(data={"sub": user.email}, expires_delta=timedelta(minutes=ACCESS_TOKEN_EXPIRE_MINUTES))
256
 
257
  # Redirect to the protected route and set the token in a secure, HTTP-only cookie
258
- response = RedirectResponse(url="/protected")
259
  response.set_cookie(key="access_token", value=f"Bearer {access_token}", httponly=True, secure=True, samesite='Lax')
260
  return response
261
 
 
255
  access_token = create_access_token(data={"sub": user.email}, expires_delta=timedelta(minutes=ACCESS_TOKEN_EXPIRE_MINUTES))
256
 
257
  # Redirect to the protected route and set the token in a secure, HTTP-only cookie
258
+ response = RedirectResponse(url="/login")
259
  response.set_cookie(key="access_token", value=f"Bearer {access_token}", httponly=True, secure=True, samesite='Lax')
260
  return response
261