We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 746bbfd commit aeb5f82Copy full SHA for aeb5f82
middleware/passport.js
@@ -14,6 +14,7 @@ module.exports = async function checkAuth(ctx, next) {
14
if (!ctx.session) {
15
ctx.session = {};
16
}
17
+ if (ctx.session.user) next();
18
const token = ctx.cookies.get("token");
19
20
if (token) {
0 commit comments