koajs / koajs/userauth

Always throw getUser error

Open
#11 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
139
Forks
17
PR merge metrics
No merged PRs in 30d

Description

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, it will always fail.

Contributor guide

Open the contributing guide

Research direction

Start by reading index.js lines 179-185 and reproduce the getUser error for an unauthenticated visitor. Trace the attempted login and redirect-to-login path behavior; done means unauthenticated visits reach the login path without throwing the getUser error.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
authentication
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.