Combining ember-simple-auth and torii Demo App
December 19, 2016 ยท View on GitHub
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>'
};
Prerequisites
You will need the following things properly installed on your computer.
Installation
git clone <repository-url>this repositorycd simple-auth-torii-github-demonpm installbower install
Running / Development
ember serve- Visit your app at http://localhost:4200.
Building
ember build(development)ember build --environment production(production)