bnoguchi/everyauth — Issue #123: Error in google-account auth after server restart
Author: DrMartiner
Created: 2011-11-29 10:46:16+00:00
State: open

Good day!

I have an error when I autorisation on Google-account:
Error:

Invalid parameter value for redirect_uri: Missing scheme: undefined/auth/google/callback

Invalid parameter value for redirect_uri: Missing scheme: undefined/auth/google/callback

Error 400

at [object Object].fail (/path/to/project/node_modules/everyauth/lib/promise.js:50:15)
at EventEmitter. (/path/to/project/node_modules/everyauth/lib/modules/oauth2.js:163:11)
at EventEmitter.emit (events.js:67:17)
at EventEmitter._respond (/path/to/project/node_modules/everyauth/node_modules/restler/lib/restler.js:127:12)
at EventEmitter._fireEvents (/path/to/project/node_modules/everyauth/node_modules/restler/lib/restler.js:131:52)
at /path/to/project/node_modules/everyauth/node_modules/restler/lib/restler.js:115:19
at IncomingMessage. (/path/to/project/node_modules/everyauth/node_modules/restler/lib/restler.js:205:5)
at IncomingMessage. (/path/to/project/node_modules/everyauth/node_modules/restler/lib/restler.js:113:32)

Sequence of actions:
run server;
go to link: https://accounts.google.com/o/oauth2/auth?client_id=399277808379%40developer.gserviceaccount.com&redirect_uri=http%3A%2F%2Flocalhost%3A8000%2Fauth%2Fgoogle%2Fcallback&response_type=code&scope=https%3A%2F%2Fwww-opensocial.googleusercontent.com%2Fapi%2Fpeople%2F ;
without pressing the button "Access", stop and run server again;
restart the server;
click to button "Access".

If I will comment this 49-55 lines in the "node_modules/everyauth/lib/promise.js", error will go away:
if ('string' === typeof err)
err = new Error(err);
this.err = err;
for (var i = 0, l = errbacks.length; i < l; i++) {
errbacks[i][0].call(errbacks[i][1], err);
}

What you say about this bug?

Yours,
Alexei!