Giter VIP home page Giter VIP logo

nuxt-auth-cognito-scheme's Introduction

@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
      }
    }
  }
}

nuxt-auth-cognito-scheme's People

Contributors

sirdiego avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

nuxt-auth-cognito-scheme's Issues

Up to date ?

Hello sirdiego. Is this repo still up to date?
I get this error by using the method this.$auth.loginWith( ... )
Can you tell me what I should add to my strategy? Thank you

TypeError: callback.newPasswordRequired is not a function
    at CognitoUser.authenticateUserInternal (CognitoUser.js?3c43:466)
    at eval (CognitoUser.js?3c43:344)
    at eval (CognitoUser.js?3c43:323)
    at eval (Client.js?1610:119)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.