4.0.0
aarongranick-okta
released this
18 Aug 19:21
·
644 commits
to master
since this release
Features
- #413 Adds support for Typescript. Uses named exports instead of default export.
- #444 New method
tokenManager.hasExpired
to test if a token is expired
Breaking Changes
- #444
- Implements "active" autoRenew. Previously tokens would be renewed or removed when calling
tokenManager.get
. Now they will be renewed or removed in the background. If autoRenew is true, tokens will be renewed before expiration. If autoRenew is false, tokens will be removed from storage on expiration. onSessionExpired
option has been removed. TokenManager events can be used to detect and handle token renewal errors.tokenManager.get
no longer implements autoRenew functionality (autoRenew is done by a separate process withinTokenManager
). Even withautoRenew
, it is possible that the token returned from the TokenManager may be expired, since renewal is an asynchronous process. New methodtokenManager.hasExpired
can be used to test the token and avoid this potential race condition.
- Implements "active" autoRenew. Previously tokens would be renewed or removed when calling