Auth0's Partner Demo for BoxWorks 2016
Clone or download
#1 Compare This branch is even with alejofernandez:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
README.md
index.html
stamplay.json
stats.html

README.md

Step by step guide

Account creation

Create a Stamplay application

Create a Box application

Configure Box as an OAuth2 provider for Auth0

  • Go to https://manage.auth0.com and under the connections => social section enable box, paste client_id and client_secret from the previous step
  • Then go to the clients section and create a new client of type Single Page Web Application
    • Go to settings and save client_id and client_secret for the next step.
    • Set https://<your-stamplay-application-id>.stamplayapp.com/auth/v1/auth0/callback as callback URL.
    • Finally go to connections and enable box (configured in the previous step).

Configure your Stamplay application

  • Open https://editor.stamplay.com/ and edit the application you created previously, go to the users => authentication section and select Auth0, fill in your account domain and client_id and client_secret from the previous step.
  • Then go to the objects section and create an object named mood, add two properties named email and mood.
  • Browse the snippets section and see how the REST API works.

Now you can go to https://<your-stamplay-application-id>.stamplayapp.com/auth/v1/auth0/connect to check that the authentication flow works.

Configure you web application

  • Clone git@github.com:alejofernandez/boxdevdemo.git
  • Find and replace <your-stamplay-application-id> with your stamplay application id in index.html, stats.html
  • Install the stamplay-cli
    npm install -g stamplay-cli
    
  • Deploy your project
    stamplay init
    
    You'll be prompted to enter your stamplay application id and your API key (located under dashboard => settings)
    stamplay deploy
    

Test your application

open https://<your-stamplay-application-id>.stamplayapp.com/ and https://<your-stamplay-application-id>.stamplayapp.com/stats.html

Or browse the existing live demo at

Credits