From 47da4c6855ddd0f8cde0bf4a7ba03c968aabeb47 Mon Sep 17 00:00:00 2001 From: Annyv2 Date: Wed, 25 Nov 2015 19:10:15 -0430 Subject: [PATCH] Update index.js --- example/index.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/example/index.js b/example/index.js index bf9ac6c..a85192c 100644 --- a/example/index.js +++ b/example/index.js @@ -2,14 +2,19 @@ var app = require('express')(); var http = require('http').Server(app); var io = require('socket.io')(http); var socketioJwt = require('socketio-jwt'); +var auth0Variables = require('./auth0-variables'); app.get('/', function(req, res){ res.sendFile(__dirname + '/index.html'); }); +app.get('/auth0-variables.js', function(req, res){ + res.sendFile(__dirname + '/auth0-variables.js'); +}); + io .on('connection', socketioJwt.authorize({ - secret: Buffer('YOUR_CLIENT_SECRET', 'base64'), + secret: Buffer(auth0Variables.AUTH0_CLIENT_SECRET, 'base64'), timeout: 15000 // 15 seconds to send the authentication message })) .on('authenticated', function(socket){