koajs / userauth

koa user auth middleware
MIT License
137 stars 18 forks source link

windows redirect problems #28

Closed micosty closed 7 years ago

micosty commented 7 years ago
if (options.rootPath !== '/') {
    options.loginPath = path.join(options.rootPath, options.loginPath);
    options.logoutPath = path.join(options.rootPath, options.logoutPath);
    options.loginCallbackPath = path.join(options.rootPath, options.loginCallbackPath);
  }

https://github.com/koajs/userauth/blob/master/index.js#L65-L69

path.join在windows下是反斜杠,登录跳转地址有误,出现重定向循环

fengmk2 commented 7 years ago

Same bug as https://github.com/node-modules/userauth/pull/11, I will fix this soon.