Skip to content

OpenID Connect authentication support for Nuxt.js

License

Notifications You must be signed in to change notification settings

deko2369/nuxt-oidc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nuxt-oidc

OpenID Connect authentication support for Nuxt.js

Usage

Install

$ npm install nuxt-oidc

Configuration

// nuxt.config.js
{
  modules: [
    '@nuxtjs/axios',
    'nuxt-oidc',
  ],
  oidc: {
    issuer: '<Your issuer>',
    clientId: '<Client ID>',
    clientSecret: '<Client Secret>',
    callbackUrl: 'http://localhost:3000/oidc/callback',
    scope: [
      'email',
      'profile',
      'address',
    ],
    // express-session configuration
    session: {
      secret: '<secret>',
      cookie: {},
      resave: false,
      saveUninitialized: false,
    },
  },
}

Use 'oidc' middleware

Use oidc middleware for pages that require authentication.

<script>
export default {
  middleware: ['oidc']
}
</script>

See sample directory for more details.

License

MIT License - Copyright (c) deko2369

About

OpenID Connect authentication support for Nuxt.js

Resources

License

Stars

Watchers

Forks

Packages

No packages published