Releases: okta/okta-oidc-js
@okta/[email protected]
Features
90d4068
- Adds ability to override theresponse_type
(#109)5d7738b
- Adds ability to override the redirect path on login (#84)
Fixes
Breaking Changes
$auth.loginRedirect
didn't require a path parameter in previous versions of this library. In order to achieve custom redirecting, we've introduced the ability to pass in a custom route that navigates users to on completion.
// Before
$auth.loginRedirect()
// Now
$auth.loginRedirect('/profile')
@okta/[email protected]
Features
c7248b3
- Adds ability to override theresponse_type
(#109)c36b794
- Adds TypeScript definitions1b8940e
- Adds ability to override the redirect path on login and logout (#84)
Fixes
Breaking Changes
ce3fcb3
- Scopes are now passed as a space separatedString
0c62752
- Requesting an access token and/or id token returns theirString
value instead of the object (#75, #106)ba85754
- MakeisAuthenticated
async2f82adc
- Removes the ability to retrieve theokta-auth-js
object. (#105)
Migration
oktaAuth.loginRedirect
didn't require a path parameter in previous versions of this library. In order to achieve custom redirecting, we've introduced the ability to pass in a custom route that navigates users to on completion.
Note: These changes are only needed when passing additionalParameters
to the method.
// Before
this.oktaAuth.loginRedirect({
sessionToken: /* sessionToken */
})
// Now
this.oktaAuth.loginRedirect('/profile', {
sessionToken: /* sessionToken */
})
Since scopes
are no longer allowed to be passed as an Array
, update your configuration's scope
value to be a String
:
const config = {
issuer: 'https://{yourOktaDomain}.com/oauth2/default',
...
scope: 'openid email profile'
}
Prior usage of getAccessToken()
or getIdToken()
would return a token object. Token String
values are now returned asynchronously:
// Before
const accessToken = this.oktaAuth.getAccessToken().accessToken;
// Now
const accessToken = await this.oktaAuth.getAccessToken();
Due to the above change, isAuthenticated
is also async
:
// Before
const loggedIn = this.oktaAuth.isAuthenticated();
// Now
const loggedIn = await this.oktaAuth.isAuthenticated();
@okta/[email protected]
@okta/[email protected]
Other
fc794ef - Set user agent on AuthJS
@okta/[email protected]
Other
cdc04c7 - Update dependencies