项目作者: jokr

项目描述 :
Sample app showcasing the authentication flow for Workplace third-party apps.
高级语言: HTML
项目地址: git://github.com/jokr/workplace-demo-authentication.git
创建时间: 2017-07-10T10:22:06Z
项目社区:https://github.com/jokr/workplace-demo-authentication

开源协议:

下载


workplace-demo-authentication

A demo application demonstrating the Workplace third-party app authentication.
Upon redirect the server exchanges the code for an access token and makes
an Graph API request to get some basic information about the company.

Running Locally

Make sure you have Node.js installed.

  1. $ git clone <repo>
  2. $ cd workplace-demo-authentication
  3. $ touch .env

Open the .env file and enter the credential details of your app in the following
form:

  1. APP_ID=YOUR_APP_ID
  2. APP_SECRET=YOUR_APP_SECRET
  3. APP_REDIRECT=YOUR_APP_REDIRECT

Then start the application.

  1. $ npm install
  2. $ npm start

Your app should now be running on localhost:5000.

Deploying to Heroku

Make sure you have the Heroku CLI installed.

  1. $ heroku create
  2. $ heroku config:set APP_ID=YOUR_APP_ID
  3. $ heroku config:set APP_SECRET=YOUR_APP_SECRET
  4. $ heroku config:set APP_REDIRECT=YOUR_APP_REDIRECT
  5. $ git push heroku master
  6. $ heroku open

or

Deploy to Heroku

Documentation