Closed emanor-okta closed 3 years ago
Hi @emanor-okta,
Thank you for your patience.
I've added a ticket to our internal backlog, and we'll review it soon.
Internal Ref: OKTA-409817
New PR for this https://github.com/okta/okta-sdk-dotnet/pull/495
Issue \
Reference okta-sdk-java PR #515 and OKTA-356323 for the same issue in the java sdk.
Code
Current behavior
Currently the expiry time of a JWT is set for 60 minutes. Okta will reject any JWT whose expiry is further than 60 minutes in the future. If the Client machine has a slight time drift (ahead) of a number of seconds Okta will reject the /token request with
(invalid_client (401, The client_assertion token has an expiration too far into the future.)
Desired behavior
Allow for slight future time drift.
Additional Context
A couple of clients periodically see
(invalid_client (401, The client_assertion token has an expiration too far into the future.)
when running management requests do to clock drift. Since Okta does not allow expiry further than 60 minutes, and the sdk sets the expiry for 60 minutes, a few second drift can cause the failures.