Alec Aivazis edited JavaScript_has_a_problem_with__.html  over 8 years ago

Commit id: 0d8082f705a4200748e86132a4632c865916013b

deletions | additions      

       

JavaScript has a problem with global state. This problem is known by almost all JavaScript developers and is exacerbated by the presence of the developers console.It seems that we can apply the original solution to this problem in order to solve our storage issue.  We can create assign  a function that is available globally in the success handler of the xhr request which will returned the decrypted authentication information in a read-only manner. The global scope of the closure makes the unencrypted authentication data readable by anyone who requires it