maxpowa / nodepomf

Pomf, rewritten in NodeJS. See it in action @
https://aww.moe
51 stars 14 forks source link

Kanri loop login #21

Closed p4rkrs closed 7 years ago

p4rkrs commented 7 years ago

Hi,

So I installed the website, and I go to IPADRESS/kanri/login and I connect with github, but he come back on the login page like I never login. I tried on another navigator (into private) and still doesn't work.

There is my conf file :

Github client id and secret keys, for Kanri authentication
config.GITHUB_CLIENT_ID = "xxx";
config.GITHUB_CLIENT_SECRET = "xxx";

// Session options for Kanri. !! YOU MUST SET THESE FOR KANRI TO WORK !!
// Set cookies are always signed with keys[0], while the other keys are
// valid for verification, allowing for key rotation.
// If you don't want to use key rotation, remove the 'keys' and use 'secret'
// instead.
// Documentation: https://github.com/expressjs/cookie-session#cookie-options
config.SESSION_OPTIONS = {
    name: 'kanri.session',
    keys: ['lmaotestingidk', 'lmaotestingidkoldlmao'],
    maxAge: (86400 * 1000), // 1 day (milliseconds)
    secureProxy: false, // Should be true if you are proxying w/ nginx etc
    domain: "http://94.177.249.162" // You should set this to your domain
}

And I use this configuration :

upstream npomf {
  server 127.0.0.1:3000;
  keepalive 128;
}
server {
  listen 80;
  listen [::]:80 ipv6only=on;

  server_name 94.177.249.162;

  location / {
    root home/suzu/npomf/files;
    try_files $uri @npomf;

    charset UTF-8;
  }

  location @npomf {
    proxy_pass http://localhost:3000/;
    proxy_redirect off;

    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-NginX-Proxy true;
  }
}

I hope you can help me,

Bye.

maxpowa commented 7 years ago

IIRC, domain in the config shouldn't have an http:// bit. If you drop that it should work, seems like its failing to properly create the session cookie.

p4rkrs commented 7 years ago

Thank's dude, fixed.