Closed raviji closed 7 years ago
@raviji I only got this issue after running npm run build
which replaced the files in the dist
directory.
If you copy the files that are in the repo dist directory into the sample directory the issue is gone. :)
To fix this, you have to make sure both libraries are included in your html:
<script src="app/aws-cognito-sdk.js"></script>
<script src="app/amazon-cognito-auth.js"></script>
And if you are using Angular, you can have access to the constructor if you add this line in your file:
declare var AWSCognito: any;
Thanks a lot @mymattcarroll & @rcfrias I fixed on June 6th itself.
How to fix this error
Uncaught TypeError: AWSCognito.CognitoIdentityServiceProvider.CognitoAuth is not a constructor