when I quickly go through the documentation on four issues, but it is pretty easy to get a token with javascript and oauth js . Just review the documentation and tutorial .
To save your data inside the application, you can easily do this using localStorage .
If you are using a server side solution to handle your api calls. You can save the token into the session and simply execute an ajax request where you will return the contents of your session. (then use localStorage again ...)
Horst source share