@digital-gigafactory/nuxt-auth
TypeScript icon, indicating that this package has built-in type declarations

2.0.2 • Public • Published

Nuxt Auth

This nuxt module has been made because the official nuxt auth module doesn't support backend storage.

This module will support session storage and multiple backend storage like redis.

Install

Install it using yarn

yarn add @digital-gigafactory/nuxt-auth

Config

modules: [
  ['@digital-gigafactory/nuxt-auth', {
    api: {
      userInfo: '/api/auth/userinfo',
      logout: '/api/auth/logout',
    },
    sessionCookie: {
      name: 'sid',
      secure: true
    },
    storage: {
      strategy: 'redis',
      redis: {
        host: process.env.AUTH_STORAGE_REDIS_HOST,
        port: process.env.AUTH_STORAGE_REDIS_PORT,
        password: process.env.AUTH_STORAGE_REDIS_PASSWORD
      }
    },
    oidc: {
      host: process.env.AUTH_HOST,
      scope: process.env.AUTH_SCOPE,
      realm: 'mon-compte',
      clientId: process.env.AUTH_CLIENT_ID,
      clientSecret: process.env.AUTH_CLIENT_SECRET,
      redirectUri: `${process.env.AUTH_BASE_REDIRECT_URI}`,
      timeout: process.env.AUTH_TIMEOUT,
      proxy: process.env.AUTH_PROXY
    }
  }]
]

For the moment only redis storage is available.

TODO:

  • [ ] Add Front-Channel Logout
  • [ ] Add Back-Channel Logout
  • [ ] Add documentation
  • [ ] Add tests
  • [ ] Add more storage strategies

Readme

Keywords

none

Package Sidebar

Install

npm i @digital-gigafactory/nuxt-auth

Weekly Downloads

0

Version

2.0.2

License

MIT

Unpacked Size

37.6 kB

Total Files

42

Last publish

Collaborators

  • jamyouss