diff options
Diffstat (limited to 'packages/meshbay-hub/src')
| -rw-r--r-- | packages/meshbay-hub/src/meshbay_hub/auth.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/packages/meshbay-hub/src/meshbay_hub/auth.py b/packages/meshbay-hub/src/meshbay_hub/auth.py index 2bf59db..34baf45 100644 --- a/packages/meshbay-hub/src/meshbay_hub/auth.py +++ b/packages/meshbay-hub/src/meshbay_hub/auth.py @@ -166,7 +166,9 @@ def decode_access_token(token: str) -> dict: """Verify and decode an access token. Raises on failure.""" if _hub_pk_pem is None: raise RuntimeError("Hub keypair not loaded") - return jwt.decode(token, _hub_pk_pem, algorithms=["EdDSA"]) + # Clock-skew tolerance (meshbay_common.handshake.JWT_LEEWAY_SECONDS): a + # client whose clock is a little fast must still be able to call the API. + return jwt.decode(token, _hub_pk_pem, algorithms=["EdDSA"], leeway=60) # ── Email encryption at rest ────────────────────────────────────────────────── |