Ported library from JavaScript to TypeScript. The API is largely backwards-compatible. The support for the deprecated implicit flow has been removed.
- the following properties are now required:
authority,client_id,redirect_uri - the following properties were renamed:
clockSkew→clockSkewInSecondsstaleStateAge→staleStateAgeInSeconds
- default of
loadUserInfochanged fromtrue→false - removed
ResponseValidatorCtorandMetadataServiceCtor- if necessary
OidcClient/UserManagerclasses may be extended to alter their behavior
- if necessary
- restricted
response_typetocodeflow only. As per OAuth 2.1: PKCE is required for all OAuth clients using the authorizationcodeflow- as in oidc-client 1.x, OAuth 2.0 hybrid flows are not supported
- the property
signingKeysis unused, unless the MetaDataService with this feature is used outside of this library.
- the following properties were renamed:
accessTokenExpiringNotificationTime→accessTokenExpiringNotificationTimeInSecondssilentRequestTimeout(milliseconds) →silentRequestTimeoutInSecondscheckSessionInterval(milliseconds) →checkSessionIntervalInSecondsrevokeAccessTokenOnSignout→revokeTokensOnSignout
- the following properties have new default values:
automaticSilentRenewchanged fromfalse→truevalidateSubOnSilentRenewchanged fromfalse→trueincludeIdTokenInSilentRenewchanged fromtrue→falsemonitorSessionchanged fromtrue→false
- type of
popupWindowFeatureschanged from a string to a dictionary- additionally, its default dimensions are now responsive to the opener window's
- a new property
revokeTokenTypes: ('access_token' | 'refresh_token')[]was added- by default,
UserManagerwill attempt revoking both token types whenrevokeTokensOnSignoutistrue. Compared to 1.x, sign out will now fail if revocations fail.
- by default,
- The shorthand for keeping the popup open after the callback with
signoutPopupCallback(true)is no longer supported. Instead usesignoutPopupCallback(undefined, true)or preferably,signoutPopupCallback(location.href, true). - renamed
revokeAccessToken()→revokeTokens(types?)- Compared to 1.x, this function will now throw if any revocation of the
types specified fail. Uses the
revokeTokenTypessetting when notypesare passed.
- Compared to 1.x, this function will now throw if any revocation of the
types specified fail. Uses the
- The getter/setters for
Log.levelandLog.loggerhave been replaced byLog.setLevel()andLog.setLogger().