Skip to content

Commit

Permalink
fix: missing return statements in middleware
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielRivers committed Jun 3, 2024
1 parent 6dc5da2 commit 3b15097
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/helpers/kindeMiddlewareHelpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ export const protectRoute = async (
if (validationResult.valid) {
req.setSessionItem('access_token', token);
next();
return;
} else {
res.sendStatus(403);
return;
Expand All @@ -81,6 +82,7 @@ export const protectRoute = async (
const callbackFn = (error: Error) => {
if (error) return res.sendStatus(403);
next();
return;
};

const pem = await getPem(issuerBaseUrl);
Expand Down

0 comments on commit 3b15097

Please sign in to comment.