Skip to content

Commit ad3abe5

Browse files
committed
Fix the exp when creating a JWT
1 parent 61c47f7 commit ad3abe5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/fastapi_oauth2/middleware.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def jwt_decode(cls, token: str) -> dict:
6363

6464
@classmethod
6565
def jwt_create(cls, token_data: dict) -> str:
66-
expire = datetime.utcnow() + timedelta(minutes=cls.expires)
66+
expire = datetime.utcnow() + timedelta(seconds=cls.expires)
6767
return cls.jwt_encode({**token_data, "exp": expire})
6868

6969

0 commit comments

Comments
 (0)