Created
March 31, 2017 01:36
-
-
Save jeffski/b562dfffad8d716f8ab94611dcabe6be to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>Cognito Sign Up Example</title> | |
<script src="https://rawgit.com/aws/amazon-cognito-identity-js/master/dist/aws-cognito-sdk.min.js"></script> | |
<script src="https://rawgit.com/aws/amazon-cognito-identity-js/master/dist/amazon-cognito-identity.min.js"></script> | |
<script> | |
var CognitoUserPool = AmazonCognitoIdentity.CognitoUserPool; | |
var poolData = { | |
UserPoolId : 'ap-southeast-2_EPyUfpQq7', // Your user pool id | |
ClientId : '54o2tsorf2j0adkefbbnhdhj3m' // Your App client id | |
}; | |
var userPool = new CognitoUserPool(poolData); | |
document.addEventListener('DOMContentLoaded', function() { | |
userPool.signUp('testuser', 'P@55w0rd', null, null, function(err, result) { | |
if (err) { | |
console.log(err); | |
return; | |
} | |
console.log(result); | |
}); | |
}); | |
</script> | |
</head> | |
<body> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment