0.1.0 • Published 6 years ago

@projektionisten/amazon-cognito-identity-js-node-fork v0.1.0

Weekly downloads
1
License
SEE LICENSE IN LI...
Repository
github
Last release
6 years ago

Amazon Cognito Identity SDK for JavaScript for Node.js

This module was originally a forked from amazon-cognito-identity-js to amazon-cognito-identity-js-node. I have since forked it again as the owner of the fork does not seem to be accepting pull requests.

I made updates to the codebase to sent a mock User Agent string in the HTTPS Requests, failure to do this causes errors like this:

ReferenceError: navigator is not defined
    at CognitoUser.authenticateUserInternal (node_modules/amazon-cognito-identity-js/lib/CognitoUser.js:343:19)

Install

npm install amazon-cognito-identity-js-node

Usage

var AWS = require('aws-sdk');
var CognitoSDK = require('amazon-cognito-identity-js-node');

AWS.CognitoIdentityServiceProvider.AuthenticationDetails = CognitoSDK.AuthenticationDetails;
AWS.CognitoIdentityServiceProvider.CognitoUserPool = CognitoSDK.CognitoUserPool;
AWS.CognitoIdentityServiceProvider.CognitoUser = CognitoSDK.CognitoUser;