Skip to content

Instantly share code, notes, and snippets.

@Natim
Created February 2, 2015 11:03
Show Gist options
  • Save Natim/033eb60cf8345a2ccf0c to your computer and use it in GitHub Desktop.
Save Natim/033eb60cf8345a2ccf0c to your computer and use it in GitHub Desktop.
How to get an Oauth token for an client side app?

One of the problem when doing full HTML5 apps is the Authentication.

With Firefox Account, the OAuth dance implies a server. Here are some tips that we are using to provide the Oauth token to the client app after the Oauth dance.

  1. First add a button to the login page: GET /fxa-oauth/login?redirect=https://web-ui/#login-cb
  2. When the user clicks it will do the oauth-dance and come back to your redirect endpoint.
  3. At this time just GET /fxa-oauth/token to get the user oauth-token.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment