everyauth icon indicating copy to clipboard operation
everyauth copied to clipboard

Github Everyauth callback error

Open lifeinafolder opened this issue 13 years ago • 0 comments

On trying to use github auth in everyauth, I get an error on callback:

starting step - getAuthUri ...finished step starting step - requestAuthUri ...finished step starting step - getCode ...finished step starting step - getAccessToken ...finished step starting step - fetchOAuthUser

/Users/rajat/Workspace/codereviewer/node_modules/everyauth/lib/modules/everymodule.js:352 throw err;

Here is my code:

everyauth.debug = true;

everyauth.github
    .appId(config.appId)
    .entryPath('/auth/github')
    .appSecret(config.appSecret)
    .findOrCreateUser( function (session, accessToken, accessTokenExtra, githubUserMetadata) {
        // find or create user logic goes here
        console.dir(githubUserMetadata);
        return {};
    })
    .redirectPath('/');

app.configure(function(){
    app.set('views', __dirname + '/views');
    app.set('view engine', 'jade');
    app.use(express.bodyParser());
    app.use(everyauth.middleware());
    app.use(express.methodOverride());
    app.use(app.router);
    app.use(express.static(__dirname + '/public'));
});

My Github callback url is:

http://localhost:3000

lifeinafolder avatar Aug 31 '12 10:08 lifeinafolder