While discussing alternatives for asking the browser to remember your password, one guy suggested using a bookmarklet to store users' credentials. The original answer is in portuguese, but I'll translate here the protocol he used:
The user, while logged in, has access to a bookmarklet [link] with a unique token
He can drag that bookmarklet to the links bar or to the bookmarks normally
When clicking in that bookmarklet, the token is stored in the property
window.name
and a URL is loadedThis URL contains a JS with another unique token
The JS merges both tokens and creates a [authentication] hash
The user is redirected to another URL with the hash as argument
A bit more convoluted than necessary IMHO, but the basic idea was saving the credentials in the favorites bar, so the user could load the site and be automatically logged in just by clicking a single link.
I'm trying to wrap my head around the implications of such practice. I'm assuming it's safe against XSS at the very least (since JavaScript code can not access the favorites bar by any means AFAIK). And compared to stored passwords in the browser, it does not seem too far off (both would allow another person with physical access to the machine to log on as that user easily). Unless there's something else I'm overlooking...
Additional Info: My original intent was to keep (not necessarily store) in the browser some data that not even the server can access (for instance a client-side encryption key). This detail is important, otherwise this scenario would be no different from a "Remember Me" feature. But please don't focus too much on the specifics (I've discussed them at length both in this site and elsewhere), only on what was asked.
In other words, assume my thread model puts more emphasis in the confidentiality of the data in the cloud, and less in the user's client computer (e.g. someone with local access seeing the password is not a concern, but a XSS vulnerability leaking it would be). And ease of use is a requirement, otherwise nobody will use my system (more secure alternatives like using a password manager or browser extension that interact with PGP or even - in the future - the WebCrypto API will be offered to the more security-minded users, but not mandated; I asked the question to understand better the implications of using bookmarklets/the favorites bar, not to base my whole decision on it alone).