Giter VIP home page Giter VIP logo

cognito-user-pool's Introduction

Hi there ๐Ÿ‘‹

I am an Engineering Director at Fountain, in charge of developing the greatest suite of frontline worker experience software.

I am the co-creator of CSML ๐Ÿฆœ, an open-source programming language written in Rust that makes it extremely easy to develop powerful and rich chatbots/voicebots. I'm also the co-founder and CTO of Clevy.io, a startup based in Paris (acquired).

I mostly code in JS, TS and Rust, and I'm otherwise quite skilled at cloud โ˜๏ธ stuff.

I'm also a former Rubik's cube champion with a best time of 11.15s, which sucks by today's standards but was very good back in 2006 ๐Ÿค“

cognito-user-pool's People

Contributors

ajagnanan avatar dependabot[bot] avatar frsechet avatar sallar avatar varshney21 avatar

Stargazers

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

Watchers

 avatar  avatar

cognito-user-pool's Issues

refreshSession not working

``
D:\Proyects\Adonis\ride_me\node_modules\amazon-cognito-identity-js\node_modules\aws-sdk\lib\request.js:31
throw err;
^

TypeError: Cannot read property 'getRefreshToken' of null
at cognitoUser.refreshSession (D:\Proyects\Adonis\ride_me\node_modules\cognito-user-pool\src\methods\refreshSession.js:28:25)
at Response. (D:\Proyects\Adonis\ride_me\node_modules\amazon-cognito-identity-js\lib\CognitoUser.js:1140:16)
at Request. (D:\Proyects\Adonis\ride_me\node_modules\amazon-cognito-identity-js\node_modules\aws-sdk\lib\request.js:364:18)
at Request.callListeners (D:\Proyects\Adonis\ride_me\node_modules\amazon-cognito-identity-js\node_modules\aws-sdk\lib\sequential_executor.js:105:20)
at Request.emit (D:\Proyects\Adonis\ride_me\node_modules\amazon-cognito-identity-js\node_modules\aws-sdk\lib\sequential_executor.js:77:10)
at Request.emit (D:\Proyects\Adonis\ride_me\node_modules\amazon-cognito-identity-js\node_modules\aws-sdk\lib\request.js:683:14)
at Request.transition (D:\Proyects\Adonis\ride_me\node_modules\amazon-cognito-identity-js\node_modules\aws-sdk\lib\request.js:22:10)
at AcceptorStateMachine.runTo (D:\Proyects\Adonis\ride_me\node_modules\amazon-cognito-identity-js\node_modules\aws-sdk\lib\state_machine.js:14:12)
at D:\Proyects\Adonis\ride_me\node_modules\amazon-cognito-identity-js\node_modules\aws-sdk\lib\state_machine.js:26:10
at Request. (D:\Proyects\Adonis\ride_me\node_modules\amazon-cognito-identity-js\node_modules\aws-sdk\lib\request.js:38:9)
at Request. (D:\Proyects\Adonis\ride_me\node_modules\amazon-cognito-identity-js\node_modules\aws-sdk\lib\request.js:685:12)
at Request.callListeners (D:\Proyects\Adonis\ride_me\node_modules\amazon-cognito-identity-js\node_modules\aws-sdk\lib\sequential_executor.js:115:18)
at Request.emit (D:\Proyects\Adonis\ride_me\node_modules\amazon-cognito-identity-js\node_modules\aws-sdk\lib\sequential_executor.js:77:10)
at Request.emit (D:\Proyects\Adonis\ride_me\node_modules\amazon-cognito-identity-js\node_modules\aws-sdk\lib\request.js:683:14)
at Request.transition (D:\Proyects\Adonis\ride_me\node_modules\amazon-cognito-identity-js\node_modules\aws-sdk\lib\request.js:22:10)
at AcceptorStateMachine.runTo (D:\Proyects\Adonis\ride_me\node_modules\amazon-cognito-identity-js\node_modules\aws-sdk\lib\state_machine.js:14:12)
``

Sign in Error Username and Pool information required

First of all thanks for this library, saves a ton of time. I am currently stuck in this error

Error: Username and pool information are required.

And this is my code

app.post('/user/signin',(req,res) => {
		var   params =  {
     		"username": req.body.phone_number,
   			 "password": req.body.password
  						};
  CognitoUserPoolWrapper.login(params, (err,result) => {
  if(err) {
      res.status(404).send({
                 'status':'error',
                 'message':'Error authenticating user'
               });
               return
    }
	res.status(200).send(result);
  });
});

Where exactly do I have to add the username and pool info? And my pool data looks like this

const poolData = {
  UserPoolId : 'us-east-1_XXXXXXXX', // your user pool ID
  ClientId : '44XXXCCCAASSDLDLDLDLDL', // generated in the AWS console
  Paranoia : 0 // an integer between 1 - 10
};

let CognitoUserPoolWrapper = require('cognito-user-pool')(poolData);

Question regarding why logout() implements globalLogout

Does logout for a specific device work? I've noticed logout() from Cognito's official SDK assumes cognitoUser class instance persists between login/logout session. That's a strange. I imagine it'd only work if you give it global scope. Is this why you're implementing globalLogout instead?

Can't get passwordForgot to work for auto-confirmed users

I have the same issue posted here. In Cognito user john's status is enabled / confirmed, so I am assuming this isn't an issue with having to verify email (or phone). I'm confused as the passwordForgot method returns Cannot reset password for the user as there is no registered/verified email or phone_number.

const data = { 'username': 'john' };
    CognitoUserPoolWrapper.passwordForgot(data, (err, result) => {
      console.log(result);
      console.log(err);
    })

Should I be using GetUserAttributeVerificationCode? Would it valuable to add this to cognito-user-pool?

Why is refreshToken is used?

Hi,

Thank you for the nice library. One question though: Why are you using refreshToken for everything instead of accessToken and idToken? What is the pointing of receiving them if you're going to use the refreshToken for everything?

Thank you
Sallar.

Requiring in different modules

Hi,
I'm using express and to use this in different modules do I need to pass the user pool data object around? Is there some way I can require the wrapper once, say in app.js and then 'require' it another module without having to invoke the constructor again?

Thanks,
Paul

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.