amazon-archives / aws-cognito-angular-quickstart

An Angular(v5)-based QuickStart single-page app utilizing Amazon Cognito, S3, and DynamoDB (Serverless architecture)
https://cognito.budilov.com
Apache License 2.0
689 stars 302 forks source link

How to get SUB id in the response after register? #79

Closed raviji closed 7 years ago

raviji commented 7 years ago

I want to get user pool sub id after register in the below function else part.

this.cognitoUtil.getUserPool().signUp(user.email, user.password, attributeList, null, function (err, result) {
            if (err) {
                callback.cognitoCallback(err.message, null);
            } else {
                //console.log("UserRegistrationService: registered user is " + result);
                callback.cognitoCallback(null, result);
            }
        });

In the below links got info like sub id is available when signup but bit confusion how to get update that, either any SDK have to update or anything have to change the function. I would appreciate if i get that sub id in response.

  1. https://github.com/aws/amazon-cognito-identity-js/issues/335
  2. http://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_SignUp.html#API_SignUp_ResponseSyntax
vbudilov commented 7 years ago

Take a look at this comment: https://github.com/aws/amazon-cognito-identity-js/issues/335#issuecomment-307523556

You need to update the AWS JS libs