From what I've read in the OAuth 2.0 specs so far, it is not recommended to store any confidential information in the browser where it would be accessible via Javascript.
The discussion here also seems to agree on this point: Using OAuth2 in HTML5 Web App
I am currently building an Ember-based app as a frontend to my REST-style API backend, and I am using Ember-Simple-Auth as a library for handling the user login, which implements the Resource Owner Password Credentials workflow and also explicitly supports refresh tokens.
I read that the "Resource Owner Password Credentials" grant type in OAuth 2.0 allows the usage of refresh tokes, but the text in this paragraph is written addressing a very general definition of client.
As Ember.js is a framework for writing single page webapps running in the browser, I am now wondering...
Would it be safe to use the refresh token in an Ember app? The discussion mentioned above seems to disagree. Which leads me to:
Why does Ember-Simple-Auth support refresh tokens?
Thanks for taking the time to consider. Best! Marcus