2
1
mirror of https://github.com/Thream/socketio-jwt.git synced 2024-07-21 09:38:31 +02:00
socketio-jwt/example
2015-11-23 19:57:18 -04:30
..
.gitignore Introduced a new example 2015-10-15 17:12:11 -04:30
index.html Introduced a new example 2015-10-15 17:12:11 -04:30
index.js Introduced a new example 2015-10-15 17:12:11 -04:30
package.json Introduced a new example 2015-10-15 17:12:11 -04:30
README.md Create README.md 2015-11-23 19:57:18 -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.

Running the example

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

You also need to set the ClientSecret, ClientId and Domain for your Auth0 app as variables with the following names respectively: AUTH0_CLIENT_SECRET, AUTH0_CLIENT_ID and AUTH0_DOMAIN.

# auth0-variables.js file
AUTH0_CLIENT_SECRET=myCoolSecret
AUTH0_CLIENT_ID=myCoolClientId
AUTH0_DOMAIN=samples.auth0.com

On your application in Auth0 you need to set http://localhost:3001 as an Allowed Origin (CORS) in the application settings page.

  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 :).