Skip to content
This repository has been archived by the owner on Jan 26, 2025. It is now read-only.

📦 Prepping 1.0.0 angular #157

Merged
merged 9 commits into from
Mar 27, 2018
Merged

📦 Prepping 1.0.0 angular #157

merged 9 commits into from
Mar 27, 2018

Conversation

jmelberg-okta
Copy link
Contributor

@jmelberg-okta jmelberg-okta commented Mar 21, 2018

Description

Introduces the changes that will go into the 1.0.0 version of @okta/okta-angular. Will follow up a Publish commit.

Changelog

@okta/okta-angular@1.0.0

Features

Fixes

Breaking Changes

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();

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants