// Load modules

var Hapi = require('hapi');
var Bell = require('../');


var server = new Hapi.Server();
server.connection({ port: 8000 });

server.register(Bell, function (err) {

    server.auth.strategy('twitter', 'bell', {
        provider: 'twitter',
        password: 'password',
        isSecure: false,
        clientId: '',                               // Set client id
        clientSecret: ''                            // Set client secret
    });

    server.route({
        method: '*',
        path: '/bell/door',
        config: {
            auth: 'twitter',
            handler: function (request, reply) {

                reply('<pre>' + JSON.stringify(request.auth.credentials, null, 4) + '</pre>');
            }
        }
    });

    server.start(function (err) {

        console.log('Server started at:', server.info.uri);
    });
});

@@ -305,16 +305,207 @@
  false,%0A
+        // Make sure to set a %22Callback URL%22 and%0A        // check the %22Allow this application to be used to Sign in with Twitter%22%0A        // on the %22Settings%22 tab in your Twitter application%0A
         

comment in Twitter example that "Callback URL" and "Allow this application to be used to Sign in with Twitter" are required for the script to work