Skip to content

Commit

Permalink
changed refresh_token max_age
Browse files Browse the repository at this point in the history
  • Loading branch information
Michał Jura committed Jan 14, 2025
1 parent 0982f89 commit 69992d4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def with_plugins() -> Iterable[PluginManager]:
plugins.cleanup()


def get_new_tokens(refresh_token) -> tuple[Any, Any] | tuple[None, None]:
def get_new_tokens(refresh_token):
data = {
"grant_type": "refresh_token",
"refresh_token": refresh_token,
Expand Down Expand Up @@ -617,7 +617,7 @@ async def login(request: Request, response: Response) -> LoginSchema:
key="refresh_token",
value=token["refresh_token"],
httponly=True,
max_age=36000,
max_age=1800,
)
return LoginSchema(status="OK")
return LoginSchema(status="Bad Token")
Expand All @@ -632,7 +632,7 @@ def refresh_token(request: Request, response: Response) -> TokenSchema:
key="refresh_token",
value=new_refresh_token,
httponly=True,
max_age=36000,
max_age=1800,
)
return TokenSchema(token=new_token)
return TokenSchema(token=None)
Expand Down

0 comments on commit 69992d4

Please sign in to comment.