Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for OAuth for Okta doesn't handle token expiration #135

Closed
wikkim opened this issue Apr 14, 2020 · 1 comment · Fixed by #138
Closed

Support for OAuth for Okta doesn't handle token expiration #135

wikkim opened this issue Apr 14, 2020 · 1 comment · Fixed by #138

Comments

@wikkim
Copy link

wikkim commented Apr 14, 2020

Referring to code introduced in this PR
https://github.com/okta/okta-sdk-nodejs/pull/128/files
https://developer.okta.com/docs/guides/implement-oauth-for-okta/overview/

The access tokens used for OAuth for Okta feature only last an hour. When using the private_key_jwt authentication access tokens instead of the traditional API Token, this SDK does not renew them so API requests from this SDK will just start failing after an hour. Here is a code snippet to reproduce
https://pastebin.com/N0eLisqU

There should be some additional logic to renew tokens ideally before they even expire.

@swiftone
Copy link
Contributor

Thanks for the report @wikkim and the repro case - we'll investigate. It is supposed to mint a new token on failure and retry.

Internal ref: OKTA-291504

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants