Skip to content

Commit

Permalink
fix: Authorization Bearer will login the user
Browse files Browse the repository at this point in the history
  • Loading branch information
gerard2perez committed Sep 11, 2017
1 parent 569da07 commit 40d6630
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/support/KoatonRouter.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@ async function protect (ctx, next) {
ctx.body = null;
ctx.status = 401;
} else {
await next();
await ctx.login();
}
await next();
})(ctx, next);
}
}
Expand Down

0 comments on commit 40d6630

Please sign in to comment.