diff options
| -rw-r--r-- | backend/authentication/backend.py | 2 | ||||
| -rw-r--r-- | backend/routes/auth/authorize.py | 4 | ||||
| -rw-r--r-- | backend/routes/forms/submit.py | 2 | 
3 files changed, 4 insertions, 4 deletions
| diff --git a/backend/authentication/backend.py b/backend/authentication/backend.py index 206d1eb..c7590e9 100644 --- a/backend/authentication/backend.py +++ b/backend/authentication/backend.py @@ -33,7 +33,7 @@ class JWTAuthenticationBackend(authentication.AuthenticationBackend):          self, request: Request      ) -> t.Optional[tuple[authentication.AuthCredentials, authentication.BaseUser]]:          """Handles JWT authentication process.""" -        cookie = request.cookies.get("BackendToken") +        cookie = request.cookies.get("token")          if not cookie:              return None diff --git a/backend/routes/auth/authorize.py b/backend/routes/auth/authorize.py index 65709ab..98f9887 100644 --- a/backend/routes/auth/authorize.py +++ b/backend/routes/auth/authorize.py @@ -41,7 +41,7 @@ async def process_token(bearer_token: dict) -> Union[AuthorizeResponse, AUTH_FAI      try:          user_details = await fetch_user_details(bearer_token["access_token"])      except httpx.HTTPStatusError: -        AUTH_FAILURE.delete_cookie("BackendToken") +        AUTH_FAILURE.delete_cookie("token")          return AUTH_FAILURE      max_age = datetime.timedelta(seconds=int(bearer_token["expires_in"])) @@ -63,7 +63,7 @@ async def process_token(bearer_token: dict) -> Union[AuthorizeResponse, AUTH_FAI      })      response.set_cookie( -        "BackendToken", f"JWT {token}", +        "token", f"JWT {token}",          secure=constants.PRODUCTION, httponly=True, samesite="strict",          max_age=bearer_token["expires_in"]      ) diff --git a/backend/routes/forms/submit.py b/backend/routes/forms/submit.py index 4224586..8680b2d 100644 --- a/backend/routes/forms/submit.py +++ b/backend/routes/forms/submit.py @@ -75,7 +75,7 @@ class SubmitForm(Route):                          expiry = None                      response.set_cookie( -                        "BackendToken", f"JWT {request.user.token}", +                        "token", f"JWT {request.user.token}",                          secure=constants.PRODUCTION, httponly=True, samesite="strict",                          max_age=(expiry - datetime.datetime.now()).seconds                      ) | 
