One of the use cases of doing Implicit Grants for OAuth 2 is for web apps that use javascript. My question is how do you store the access token?
For web apps with server side scripting I normally store the access token in a database or in a cookie that's not JS accessible. For a mobile app which also uses implicit grant, you can store the token in the device. But for a JS web app, the only way I could think of is to store it in memory in a private variable. The difference with having server side scripting is with this is that once the page is closed, you're technically logged out. But how is this normally done?