bnoguchi/everyauth — Issue #184: "Warning: Try to pass only Errors": what do you mean?
Author: giacecco
Created: 2012-02-20 21:36:35+00:00
State: open

Hi,
I am trying implementing GoogleHybrid and I get the "Try to pass only Errors" as soon as I get the callback from Google. The full error log shows a status code 400 with some reference to "parameter_absent" and it is not really clear to me what causes that.

```
Warning: Try to pass only Errors

/Users/giacecco/Documents/Projects/jour.no/faves/eclipse-workspace/journo-faves/node_modules/everyauth/lib/modules/everymodule.js:356
throw err;
^
Error: {"statusCode":400,"data":"parameter_absent\noauth_parameters_absent:oauth_token\n\n"}
at /Users/giacecco/Documents/Projects/jour.no/faves/eclipse-workspace/journo-faves/node_modules/everyauth/lib/modules/everymodule.js:354:11
at [object Object].fail (/Users/giacecco/Documents/Projects/jour.no/faves/eclipse-workspace/journo-faves/node_modules/everyauth/lib/promise.js:53:24)
at /Users/giacecco/Documents/Projects/jour.no/faves/eclipse-workspace/journo-faves/node_modules/everyauth/lib/modules/googlehybrid.js:40:27
at /Users/giacecco/Documents/Projects/jour.no/faves/eclipse-workspace/journo-faves/node_modules/everyauth/node_modules/oauth/lib/oauth.js:432:22
at passBackControl (/Users/giacecco/Documents/Projects/jour.no/faves/eclipse-workspace/journo-faves/node_modules/everyauth/node_modules/oauth/lib/oauth.js:366:13)
at IncomingMessage. (/Users/giacecco/Documents/Projects/jour.no/faves/eclipse-workspace/journo-faves/node_modules/everyauth/node_modules/oauth/lib/oauth.js:378:9)
at IncomingMessage.emit (events.js:88:20)
at HTTPParser.onMessageComplete (http.js:137:23)
at CleartextStream.ondata (http.js:1150:24)
at CleartextStream._push (tls.js:375:27)
```

My Google-Hybrid configuration is:

```
everyauth.googlehybrid
.consumerKey('CONSUMERKEY')
.consumerSecret('CONSUMERSECRET')
.scope([ 'http://docs.google.com/feeds/' ])
.myHostname("http://dev.jour.no:3000")
.findOrCreateUser(function(session, userAttributes) {
var username = usersByGoogleHybridId[userAttributes.claimedIdentifier] || (usersByGoogleHybridId[userAttributes.claimedIdentifier] = addUser('googlehybrid', userAttributes));
return username;
})
.redirectPath('/');
```

... and the callback URL from Google at the moment my code crashes is:

```
http://dev.jour.no:3000/auth/googlehybrid/callback?openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&openid.mode=id_res&openid.op_endpoint=https%3A%2F%2Fwww.google.com%2Faccounts%2Fo8%2Fud&openid.response_nonce=2012-02-20T21%3A08%3A00ZmHOUTpoqaTf-YA&openid.return_to=http%3A%2F%2Fdev.jour.no%3A3000%2Fauth%2Fgooglehybrid%2Fcallback&openid.assoc_handle=AMlYA9WbOiWSFarYIOiwBnPj9oESrremoeuVfxc7kP9xwZKT6OJff2bk1L195MW1eIVE67u5&openid.signed=op_endpoint%2Cclaimed_id%2Cidentity%2Creturn_to%2Cresponse_nonce%2Cassoc_handle%2Cns.ext1%2Cext1.mode%2Cext1.type.firstname%2Cext1.value.firstname%2Cext1.type.email%2Cext1.value.email%2Cext1.type.lastname%2Cext1.value.lastname&openid.sig=Ev2imbQcaA9YAmrfh%2F%2BpRujmP1NHmUiio8pNE%2BWxlkc%3D&openid.identity=https%3A%2F%2Fwww.google.com%2Faccounts%2Fo8%2Fid%3Fid%3DAItOawnMn50jahcIg3fMQEqamXGZBlMU7UBWXk8&openid.claimed_id=https%3A%2F%2Fwww.google.com%2Faccounts%2Fo8%2Fid%3Fid%3DAItOawnMn50jahcIg3fMQEqamXGZBlMU7UBWXk8&openid.ns.ext1=http%3A%2F%2Fopenid.net%2Fsrv%2Fax%2F1.0&openid.ext1.mode=fetch_response&openid.ext1.type.firstname=http%3A%2F%2Faxschema.org%2FnamePerson%2Ffirst&openid.ext1.value.firstname=MYFIRSTNAME&openid.ext1.type.email=http%3A%2F%2Faxschema.org%2Fcontact%2Femail&openid.ext1.value.email=MYEMAIL&openid.ext1.type.lastname=http%3A%2F%2Faxschema.org%2FnamePerson%2Flast&openid.ext1.value.lastname=MYSURNAME
```

Any advice?

Giacecco