userauth icon indicating copy to clipboard operation
userauth copied to clipboard

koa user auth middleware

Results 9 userauth issues
Sort by recently updated
recently updated
newest added

this mr enable match config support async function

当 session 存在时但是用户信息不存在时,而当前请求是 `/login`,但是我的`ignore` 逻辑中因为其他一些条件的限制,也会导致该请求不进入登录页。 我认为这里的 ignore 逻辑应该和 egg 的 ignore 逻辑一样,命中 ignore,整个中间件逻辑都不再执行。

Hi, Are you going to migrate this module to [koa v2 middleware signature](https://github.com/koajs/koa/blob/HEAD/docs/migration.md)?

``` if (!this.session) { debug('this.session not exists'); // ignore not match path if (!loginRequired) { debug('not match needLogin path, %j', this.path); return yield next; } debug('relogin again'); return yield loginHandler.call(this,...

Whenever a user which is not logined visit the site, it throws a getUser error. Why is `userauth` [trying to login directly before redirect to login path](https://github.com/koajs/userauth/blob/master/index.js#L179-L185)? In my case,...

## Checklist - [ ] I have ensured my pull request is not behind the main or master branch of the original repository. - [ ] I have rebased all...

## Describe the feature When we use fetch to get json data from server,userauth return 302 with redirect url。Fetch will throw TypeError: failed to fetch caused by cors error. It's...

enhancement