Skip to content

Commit ab273cd

Browse files
committed
feat: increase default JWT_LEEWAY in open_id_connect to 1.0 seconds
The default value defined in the jwt module is 0 seconds, so when the time is off just by a few milliseconds, the token validation fails with error "The token is not yet valid (iat)".
1 parent c2013e6 commit ab273cd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

social_core/backends/open_id_connect.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class OpenIdConnectAuth(BaseOAuth2):
5454
USERNAME_KEY = "preferred_username"
5555
JWT_ALGORITHMS = ["RS256"]
5656
JWT_DECODE_OPTIONS = {}
57-
JWT_LEEWAY = 0 # seconds
57+
JWT_LEEWAY = 1.0 # seconds
5858
# When these options are unspecified, server will choose via openid autoconfiguration
5959
ID_TOKEN_ISSUER = ""
6060
ACCESS_TOKEN_URL = ""

0 commit comments

Comments
 (0)