I have a JavaScript file which I run locally which connects to an API. Currently I store the login details in a config file, but I don't want to do this.
Instead I want to present the user with a login form (with no backend, only JS) and have those credentials somehow stored with a reasonable level of security and used as the credentials for the API access, instead of using hardcoded ones.
Is this even possible in JavaScript?