Nearly Perpendicular Macaroons
    Wondering what’s next for npm?Check out our public roadmap! »

    @sirdiego/nuxt-auth-cognito-scheme

    1.0.5 • Public • Published

    @sirdiego/nuxt-auth-cognito-scheme

    Setup

    Install with npm:

    npm install --save @sirdiego/nuxt-auth-cognito-scheme

    Install with yarn:

    yarn add @sirdiego/nuxt-auth-cognito-scheme

    Edit nuxt.config.js:

    {
      modules: [
        '@nuxtjs/axios',
        '@sirdiego/nuxt-auth-cognito-scheme', // Insert before @nuxtjs/auth
        '@nuxtjs/auth'
      ],
      auth: {
        strategies: {
          cognito: {
            tokenType: "Bearer",
            globalToken: true,
            tokenRequired: true,
            tokenName: "Authorization",
            autoFetchUser: true,
            userPoolId: process.env.AWS_COGNITO_USER_POOL_ID,
            clientId: process.env.AWS_COGNITO_CLIENT_ID,
            refreshInterval: 5 * 60 * 1000, // Set to 0 to disable the browser interval
            fetchUserCallback: false // Can be used to put more information into the user object
          }
        }
      }
    }

    Keywords

    none

    Install

    npm i @sirdiego/nuxt-auth-cognito-scheme

    DownloadsWeekly Downloads

    29

    Version

    1.0.5

    License

    ISC

    Unpacked Size

    7.8 kB

    Total Files

    5

    Last publish

    Collaborators

    • avatar