#StandWithUkraine
Today, 27th January 2023, Ukraine is still bravely fighting for democratic values, human rights and peace in whole world. Russians ruthlessly kill all civilians in Ukraine including childs and destroy their cities.
We are uniting against Putinโs invasion and violence, in support of the people in Ukraine. You can help by donating to Ukrainian's army.
One of the possible issues that the order of included scripts is important, this works:
<script type="text/javascript" src="jsbn.js"></script>
<script type="text/javascript" src="jsbn2.js"></script>
<script type="text/javascript" src="sjcl.js"></script>
<script type="text/javascript" src="moment.js"></script>
<script type="text/javascript" src="aws-cognito-sdk.min.js"></script>
<script type="text/javascript" src="amazon-cognito-identity.min.js"></script>
But this gives read property 'hex' of undefined
:
<script type="text/javascript" src="jsbn.js"></script>
<script type="text/javascript" src="jsbn2.js"></script>
<script type="text/javascript" src="moment.js"></script>
<script type="text/javascript" src="aws-cognito-sdk.min.js"></script>
<script type="text/javascript" src="amazon-cognito-identity.min.js"></script>
<script type="text/javascript" src="sjcl.js"></script> <!--- wrong, to late
Also not forget to use SJCL
with code byte options. Here is very basic demo with all lib js files included:
AWS Cognito pool
You need to enter Cognito pool parameters on demo form
You can found Cognito User Pool Id
on Pool details
page. You also need to add App on Apps
page, and when you add an app ensure not to generate secret (this is not supported by javascript SDK):
When App created copy Cognito Client ID form Apps
page