Skip to content
This repository has been archived by the owner on Jun 25, 2024. It is now read-only.

Commit

Permalink
Increase the JWT validation window (nbf) timeout
Browse files Browse the repository at this point in the history
The deployment server is currently 50 seconds behind my local machine
so increasing to 3 minutes should be a workaround.
  • Loading branch information
MaybeJustJames committed Jul 19, 2023
1 parent a555711 commit ac5101b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion server/app/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ async def get_bearer_token(
keys,
audience="training_vote",
access_token=tkn["access_token"],
options={"leeway": 30},
options={"leeway": 180},
)
except (ExpiredSignatureError, JWTClaimsError, JWTError) as err:
raise HTTPException(
Expand Down
2 changes: 1 addition & 1 deletion server/app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ async def lifespan(_app: FastAPI) -> AsyncGenerator[None, None]:


def main() -> None:
"Launched with `poetry run start` at server root level (development only)"
"Launch with `poetry run start` at server root level (development only)"
import uvicorn # pylint: disable=import-outside-toplevel

uvicorn.run("app.main:app", host="0.0.0.0", reload=True)

0 comments on commit ac5101b

Please sign in to comment.