New option cookies
allows overriding default secure
and sameSite
values.
-
#308 - Removed
jquery
andreqwest
httpRequesters -
#309 - Removed
Q
library, now using standard Promise. IE11 will require a polyfill for thePromise
object. Use ofPromise.prototype.finally
requires Node > 10.3 for server-side use. -
#310 - New behavior for signOut()
postLogoutRedirectUri
will default towindow.location.origin
- signOut() will revoke access token and perform redirect by default. Fallback to XHR closeSession() if no idToken.
- New method closeSession() for XHR signout without redirect or reload.
- New method revokeAccessToken()
-
#311 - parseFromUrl() now returns tokens in an object hash (instead of array). The
state
parameter (passed to authorize request) is also returned. -
#313 - An HTTPS origin will be enforced unless running on
http://localhost
orcookies.secure
is set tofalse
-
#316 - Option
issuer
is required. Optionurl
has been deprecated and is no longer used. -
#317 -
pkce
option is nowtrue
by default.grantType
option is removed. -
#320 -
getWithRedirect
,getWithPopup
, andgetWithoutPrompt
previously took 2 sets of option objects as parameters, a set of "oauthOptions" and additional options. These methods now take a single options object which can hold all available options. Passing a second options object will cause an exception to be thrown. -
- Default responseType when using implicit flow is now
['token', 'id_token']
. - When both access token and id token are returned, the id token's
at_hash
claim will be validated against the access token
- Default responseType when using implicit flow is now
-
#325 - Previously, the default
responseMode
for PKCE was"fragment"
. It is now"query"
. Unless explicitly specified using theresponseMode
option, theresponse_mode
parameter is no longer passed bytoken.getWithRedirect
to the/authorize
endpoint. Theresponse_mode
will be set by the backend according to the OpenID specification. Implicit flow will use"fragment"
and PKCE will use"query"
. If previous behavior is desired, PKCE can set theresponseMode
option to"fragment"
. -
#329 - Fix internal fetch implementation.
responseText
will always be a string, regardless of headers or response type. If a JSON object was returned, the object will be returned asresponseJSON
andresponseType
will be set to "json". Invalid/malformed JSON server response will no longer throw a raw TypeError but will return a well structured error response which includes thestatus
code returned from the server.
-
#306 - Now using babel for ES5 compatibility. All polyfills have been removed.
-
#312 - Added an E2E test for server-side authentication (node module, not webpack).
-#338 - (Fix for Chrome 80) Setting 'Secure' on cookies if running on HTTPS. Setting 'SameSite=Lax' on cookies if running on HTTP. TokenManager (if using cookie storage) will retain previous behavior, setting 'SameSite=Lax' in all cases unless tokenManager.secure
is set to true
via config.
- #334 - Setting 'SameSite=none' for all cookies (Fix for iFrame)
- #324 - Support
responseMode: "query"
option for SPA apps using PKCE flow
- #315
getWellKnown
was using base url over issuer. Method has been fixed to use issuer, if configured, and will fallback to base url - #319 - Setting 'SameSite=lax' for all cookies (Fix for Firefox/Safari)
- #304 - Will set a 'SameSite' value on all cookies set by this SDK
- Cookies intended for server-side use will be set to 'Lax', cookies intended for client-side use will be set to 'Strict'
- #271 - New option
onSessionExpired
- #293 - Copy markdown files to package directory during publish
- #288 - New options for
signOut
:- Can provide a post-logout redirect URI.
- Can revoke access token
- #288 - calling
signOut
will clear the TokenManager. - #284 -
isPKCESupported
will return false ifTextEncoder
is not available (IE Edge).
- #284 - better error messages when attempting to use PKCE in an unsupported browser configuration.
- Fixes incorrect npm publish of previous version
- #266 - New storage options for TokenManager
- #265 - Fix for popup blockers
- #256 - Adds E2E tests, updates test app
- #249 - Convert to yarn workspace
- #264 - Removed lib/config.js, replaced with lib/constants.js and webpack define
- add5369 Add support to pass callback to poll function
- 541683 Origin mismatch will now cause promise rejection (token renew)
- d9900a TokenManager: return existing promise for concurrent requests
- 77ece4 Clear token on 'AuthSdkError'
- (#238) - Adds pass-thru of optional 'loginHint' and 'idpScopes' params (resolves issue #214)
- (#235) - Option
grantType
has been deprecated and will be removed in 3.0
- (#233) - New option
pkce
-
(#233) The default
responseMode
was incorrectly set tofragment
instead ofquery
when theresponseType
wascode
. This regression was introduced in version2.6.0
. -
747216b fix build process, so that /dist/okta-auth-js.min.js is for browsers (since version 2.2.0, dist/ output was being built for node.js applications, which was not intended)
- d8d2fee TokenManager: new option
expireEarlySeconds
- TokenManager: Re-enables use of custom storage keys
- TokenManager: Document the
maxClockSkew
option
- 0a8a4e1 PKCE support
- TokenManager: tokens were being expired 5 minutes early
- d736cc9 - New TokenManager option to support HTTPS-only "secure" cookies.
- fddec0a - Use
fetch
as the default request agent (instead ofreqwest
).
- #187 - When deprecated
ajaxRequest
was passed to config, the logger for the deprecate message was still using window.console. This fix makes the logger isomorphic.
- #184 - Adds support for calling the AuthN API from Node
- #172 - Fixes an issue where default storage was read-only
- #161 -
ignoreSignature
was not set when redirecting
- Fixed an problem, introduced in 2.0.0, that was causing tokens to be refreshed every time
authClient.tokenManager.get('accessToken')
was called.
-
Token retrieval is now asyncronous to account for automatic token renewal.
// ES2016+ const accessToken = await authClient.tokenManager.get('accessToken'); // Handle as a promise authClient.tokenManager.get('accessToken') .then(function(accessToken) { console.log(accessToken); });
-
Removed the following deprecated methods:
idToken.authorize
idToken.verify
idToken.refresh
idToken.decode
- Clears whitespace around URLs when instantiating the client.
- Infer the
url
from theissuer
to simplify client setup.
- Renames all
refresh
methods on thetoken
andtokenManager
objects torenew
.