Giter Site home page Giter Site logo

Comments (8)

vbudilov avatar vbudilov commented on May 14, 2024

Hi @vinodhum , can you please provide more information as to when you're getting this error? How you built the project? How are you testing it?

Thanks.

from aws-cognito-angular-quickstart.

vinodhum avatar vinodhum commented on May 14, 2024

sure,
here is js included in index.html

  <script src="./jsbn.js"></script>
  <script src="./jsbn2.js"></script>
  <script src="./sjcl.js"></script>
  <script src="./moment.min.js"></script>
  <script src="./aws-cognito-sdk.min.js"></script>
  <script src="./amazon-cognito-identity.min.js"></script>
  <script src="build/js/aws-sdk.min.js"></script>

below in angular2 service.

    var authenticationData = {
        Username : 'username',
        Password : 'password',
    };
    var authenticationDetails = new AWSCognito.CognitoIdentityServiceProvider.AuthenticationDetails(authenticationData);
    var poolData = { UserPoolId : 'us-east-1_TcoKGbf7n',
        ClientId : '4pe2usejqcdmhi0a25jp4b5sh3'
    };
    var userPool = new AWSCognito.CognitoIdentityServiceProvider.CognitoUserPool(poolData);
    var userData = {
        Username : 'username',
        Pool : userPool
    };
    var cognitoUser = new AWSCognito.CognitoIdentityServiceProvider.CognitoUser(userData);
    cognitoUser.authenticateUser(authenticationDetails, {
        onSuccess: function (result) {
            console.log('access token + ' + result.getAccessToken().getJwtToken());
        },

        onFailure: function(err) {
            alert(err);
        },

    });

with above setup I am able to create user but cannot authentication.
I am using it on angular2.
is there any angular2 module for aws ?

from aws-cognito-angular-quickstart.

vbudilov avatar vbudilov commented on May 14, 2024

Have you made any changes to the original code? If so, can you revert your changes and check if everything works out-of-the-box?

from aws-cognito-angular-quickstart.

vinodhum avatar vinodhum commented on May 14, 2024

actually, aws-cognito-angular2-quickstart out of the box did not work
it was giving lot of errors.
so went through all the code and extracted just aws services.

from aws-cognito-angular-quickstart.

vbudilov avatar vbudilov commented on May 14, 2024

I can try to help you with the original code, but most likely won't be able to help you with the derivative.

If you tell me which errors you saw with the original code, and how to replicate those errors, then I can try to help you out.

Thanks,
Vladimir

from aws-cognito-angular-quickstart.

vinodhum avatar vinodhum commented on May 14, 2024

ok thanx I was able to make it work. I had to use all the sdk versions from original code.

from aws-cognito-angular-quickstart.

vinodhum avatar vinodhum commented on May 14, 2024

I can authenticate but after auth it gives me this error "message":"Token is not from a supported provider of this identity pool" any idea what it means ?

from aws-cognito-angular-quickstart.

vbudilov avatar vbudilov commented on May 14, 2024

@vinodhum , I've googled it for you and see a lot of possible solutions. Here's one:
http://stackoverflow.com/questions/37914184/using-dynamodb-with-cognito-token-is-not-from-a-supported-provider-of-this-iden

I'm going to close this case since the initial problem isn't with the original code. You can always reopen it if you feel that it is.

Thanks for using the project!

Vladimir

from aws-cognito-angular-quickstart.

Related Issues (20)

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.