Not able to login the user due to sjcl error #39
Comments
Hi Jeetendra, This happens because the Stanford JavaScript Crypto Library doesn't include the bytes codec that the SDK uses so it must be included with the --with-codecBytes option when configuring the Stanford JavaScript Crypto Library (see sjlc README/INSTALL). It is known to build on Linux and requires a Java runtime. Ionut. |
This might help you out. One of the comments has a zip file with the bytes codec included in the sjcl. It should do the trick. |
Hi @itrestian , Thanks for the information and reference, however I am not very sure how to proceed with this issue. I am using local machine to test this and have the java runtime available, but I am not able to configure and use SJCL due to lack of proper documentation regarding this. Is there any more specific documentation on how to utilise it with plain javascript. @samuelsensei the provided link doesn't work and gives a page not found error. I have created a question on Stack Overflow for same. Thanks & Regards |
The link provided by samuelsensei is broken, this should link directly to the zip of the library with the codec included: https://github.com/aws/amazon-cognito-identity-js/files/233157/sjcl.js.zip or |
Hi @appeality, Thanks a lot you made my day. Now it works perfectly. Thank you very very much. Best Regards |
I am getting following error using similar code for authenticating user ; "amazon-cognito-identity.min.js:19Uncaught TypeError: Cannot read property 'hex' of undefined(…)" I tried with sjcl.js attached in this thread. |
@amank12 Are you using Angular 2 cli? |
I am using JavaScript in HTML. This problem got resolved after I changed order of js files included at top of file. |
@appeality Where should I include that file? |
You should include below mentioned scripts in your index.html file or which ever file you are loading first.
|
Hi ,
I am trying to login the user after successful sign up. However I am getting below error -
TypeError: undefined is not an object (evaluating 'sjcl.codec.bytes.toBits')
`
Here is my repository for the code, Really appreciate any help in this regard.
Thanks & Regards
Jeetendra
The text was updated successfully, but these errors were encountered: