Search code examples
node.jsexpressrediseveryauth

Node.js everyauth cluster error


I write scalable application with node.js and have a problem. When I click on facebook auth link (/auth/facebook) and when it's redirect me back — throws the error:

{"error":{"message":"redirect_uri isn't an absolute URI. Check RFC 3986.","type":"OAuthException","code":191}}

I think, it's because I use cluster. I try to set RedisStore for session:

RedisStore = require('connect-redis')(express);

...somecode...

app.use(express.session({ store: new RedisStore(), secret: 'secret code'}));

But it's still not work. Also, the "findOrCreateUser" function work correct and i get user info as I want. All I need is redirect user to index page.

I'm use Express 3, Node 0.8.14

Everyauth have the same issue on github https://github.com/bnoguchi/everyauth/issues/153

Thanks in advance!


Solution

  • I'm resolved my problem by using passportjs instead everyauth.