How to use @okta/okta-vue - 1 common examples

To help you get started, we’ve selected a few @okta/okta-vue examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github oktadeveloper / okta-vuejs-aspnetcore-todo-example / ClientApp / router.js View on Github external
Vue.use(Auth, {
  // Replace this with your Okta domain:
  issuer: 'https://{yourOktaDomain}.com/oauth2/default',
  // Replace this with the client ID of the Okta app you just created:
  client_id: '{clientId}',
  redirect_uri: 'http://localhost:5000/implicit/callback',
  scope: 'openid profile email'
})

const router = new Router({
  mode: 'history',
  base: __dirname,
  routes: [
    { path: '/', component: Dashboard },
    // Handle the redirect from Okta using the Okta Vue SDK
    { path: '/implicit/callback', component: Auth.handleCallback() },
  ]
})

// Check the authentication status before router transitions
router.beforeEach(Vue.prototype.$auth.authRedirectGuard())

export default router

@okta/okta-vue

Vue support for Okta

Apache-2.0
Latest version published 7 months ago

Package Health Score

64 / 100
Full package analysis

Popular @okta/okta-vue functions