This ember app demonstrates how to authenticate and authorize an Ember app to use the GitHub APIs using
ember-simple-auth and torii. It
follows the narrative in the ember-simple-auth
guide
on the same topic. Each commit corresponds to a section of the guide, with some corrections
at the end.
You will need to add a .env
file to the project root with your application client ID
from your GitHub OAuth Application registration
and token exchange URL. The token exchange URL below uses the http-mock
implementation
in the project.
GITHUB_DEV_CLIENT_ID=<YOUR CLIENT ID>
DEV_TOKEN_EXCHANGE_URL=http://localhost:4200/api/token
You will also need to create a /server/settings.js
file for the token exchange
server's parameters, also from your OAuth Application registration.
module.exports = {
CLIENT_ID: '<YOUR CLIENT ID>',
CLIENT_SECRET: '<YOUR CLIENT SECRET>',
USER_AGENT: '<YOUR APPLICATION NAME>'
};
You will need the following things properly installed on your computer.
git clone <repository-url>
this repositorycd simple-auth-torii-github-demo
npm install
bower install
ember serve
- Visit your app at http://localhost:4200.
ember build
(development)ember build --environment production
(production)