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.
Make sure you have Node.js installed.
$ git clone <repo>
$ cd workplace-demo-authentication
$ touch .env
Open the .env
file and enter the credential details of your app in the following
form:
APP_ID=YOUR_APP_ID
APP_SECRET=YOUR_APP_SECRET
APP_REDIRECT=YOUR_APP_REDIRECT
Then start the application.
$ npm install
$ npm start
Your app should now be running on localhost:5000.
Make sure you have the Heroku CLI installed.
$ heroku create
$ heroku config:set APP_ID=YOUR_APP_ID
$ heroku config:set APP_SECRET=YOUR_APP_SECRET
$ heroku config:set APP_REDIRECT=YOUR_APP_REDIRECT
$ git push heroku master
$ heroku open
or