2
1
mirror of https://github.com/Thream/socketio-jwt.git synced 2024-07-21 09:38:31 +02:00
socketio-jwt/example/socketsio-auth0-sample
2015-12-01 15:40:25 -04:30
..
public/stylesheets Create style.css 2015-12-01 15:40:25 -04:30
views Create layout.jade 2015-12-01 15:38:49 -04:30
index.js Update index.js 2015-12-01 15:33:06 -04:30
package.json Update package.json 2015-12-01 15:31:58 -04:30
README.md Update README.md 2015-11-26 09:49:32 -04:30

Auth0 + Socket.io

This is the seed project you need to use if you're going to create a Socket.io single page app that will use Auth0.

Configure your Auth0 credentials

First, you need to put your AUTH0_DOMAIN (example.auth0.com), your AUTH0_CLIENT_ID and your AUTH0_CLIENT_SECRET on the auth0-variables.js file . You can find this information in the Application Settings on your Auth0.com dashboard.

Set up the Allowed Origin (CORS) in Auth0

Then, you need to put http://localhost:3001 as an Allowed Origin (CORS) in the Application Settings on your Auth0.com dashboard.

Running the example

In order to run the example, you need to have node installed.

  1. run npm install
  2. run node index.js in the directory of this project.

Go to http://localhost:3001 and you'll see the app running :).