okta / samples-js-angular

samples-js-angular
https://github.com/okta/samples-js-angular
Other
73 stars 149 forks source link

Update dependencies, fix security vulnerabilities #88

Closed swiftone closed 4 years ago

mraible commented 4 years ago

@swiftone Can you please try adding http://localhost:8080/callback as a login redirect URI to the app on https://samples-javascript.okta.com and restarting the job in Travis?

swiftone commented 4 years ago

Added and restarted

mraible commented 4 years ago

Sahweet! Tests pass!! 🎉

mraible commented 4 years ago

@swiftone I updated my branch to use /login/callback and upgrade to Angular 10.1. Should I create a new PR or are you able to merge those changes into this one?

swiftone commented 4 years ago

@mraible - Assuming I git'ted correctly, your changes should now be in here, let me know if anything is missing.

mraible commented 4 years ago

@swiftone I noticed that the current custom login example has the following:

const oktaConfig = Object.assign({
  onAuthRequired: ({oktaAuth, router}) => {
    // Redirect the user to your custom login page
    router.navigate(['/login']);
  }
}, sampleConfig.oidc);

However, the Angular SDK docs seem to indicate it should be:

const oktaConfig = Object.assign({
  onAuthRequired: (oktaAuth, injector) => {
    const router = injector.get(Router);
    // Redirect the user to your custom login page
    router.navigate(['/login']);
  }
}, sampleConfig.oidc);

Which one is correct?

aarongranick-okta commented 4 years ago

@mraible the second one. The first argument is the Okta auth service, the second argument is the Angular injector (this changed in okta-angular 2.0 I think)

mraible commented 4 years ago

@aarongranick-okta In that case, can you please include this commit in this PR.