Knowledge Base

Preserving for the future: Shell scripts, AoC, and more

Infcloud: auto login my way

I have now added to InfCloud the ability to use the browser localStorage feature to store username, password, and chosen locale. To be more precise, it can load these values if present. InfCloud does not set them yet. I haven't bothered to write that part.

To use this feature, you need to run a few commands in the javascript console of your web browser. Not all of my browsers work correctly, even though localStorage object exists.

localStorage.setItem("user","bgstack15");
localStorage.setItem("pass","plaintexthere");
localStorage.setItem("locale","English (24h)");

The locale value is the contents of the text box, and not the shortcode such as en_BS.

If these values are set, when you refresh the page it should auto-login right away.

See the commit that includes the functionality.

Comments