Skip to content
This repository has been archived by the owner on Oct 24, 2024. It is now read-only.

Releases: okta/okta-oidc-js

@okta/[email protected]

27 Mar 23:23
efae2a8
Compare
Choose a tag to compare

Features

  • 90d4068 - Adds ability to override the response_type (#109)
  • 5d7738b - Adds ability to override the redirect path on login (#84)

Fixes

  • 25bbbd2 - Replace the current path instead of pushing (#98)

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]

27 Mar 23:22
efae2a8
Compare
Choose a tag to compare

Features

  • c7248b3 - Adds ability to override the response_type (#109)
  • c36b794 - Adds TypeScript definitions
  • 1b8940e - Adds ability to override the redirect path on login and logout (#84)

Fixes

  • 79280a7 - Fixes URL params not being picked up when redirecting (#123)

Breaking Changes

  • ce3fcb3 - Scopes are now passed as a space separated String
  • 0c62752 - Requesting an access token and/or id token returns their String value instead of the object (#75, #106)
  • ba85754 - Make isAuthenticated async
  • 2f82adc - Removes the ability to retrieve the okta-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]

19 Mar 20:19
Compare
Choose a tag to compare

Features

8b5200b - Adds getUser helper method (#148)

Fixes

2c4dd6d - fix navigation guard arguments order (#112)

Other

fc794ef - Set user agent on AuthJS

@okta/[email protected]

19 Mar 20:19
Compare
Choose a tag to compare

Other

fc794ef - Set user agent on AuthJS

@okta/[email protected]

19 Mar 20:18
Compare
Choose a tag to compare

Other

cdc04c7 - Update dependencies

@okta/[email protected]

19 Mar 20:15
Compare
Choose a tag to compare

Features

e02a0ff - Adds getUser method (#147)

Other

fc794ef - Set user agent on AuthJS