Skip to content

error: client_assertion token has an expiration too far into the future #382

@gabrielsroka

Description

@gabrielsroka

Okta node sdk sets expiration for 5 minutes:
https://github.com/okta/okta-sdk-nodejs/blob/895d48c9bf4e2e1d0d2fadcf0a84cc550e301851/src/jwt.js#L72-L84

whereas Python uses 60 minutes:

okta-sdk-python/okta/jwt.py

Lines 114 to 122 in 700c5f1

expiry_time = issued_time + JWT.ONE_HOUR
# generate unique JWT ID
generated_JWT_ID = str(uuid.uuid4())
# Create claims for token and create token
claims = {
'sub': client_id,
'iat': issued_time,
'exp': expiry_time,

i frequently get

okta-sdk-python - http_client - ERROR - {'message': "HTTP 401 {'error': 'invalid_client', 'error_description': 
'The client_assertion token has an expiration too far into the future.'}"}

errors on Python, but never on node. i set my clock using time.windows.com, but it's usually 1 sec fast

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions