Skip to content

Commit

Permalink
Pass next to accessDenied method to allow error handling
Browse files Browse the repository at this point in the history
The `next` callback was not being passed in this instance of `keycloak.accessDenied` (as opposed to the similar call on L27). This means that implementations cannot easily handle the error using standard express error handling mechanisms.
  • Loading branch information
lennym authored and Bruno Oliveira da Silva committed Aug 28, 2018
1 parent 55e54b5 commit 25141a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion middleware/post-auth.js
Expand Up @@ -49,7 +49,7 @@ module.exports = function (keycloak) {
}
response.redirect(cleanUrl);
}).catch((err) => {
keycloak.accessDenied(request, response);
keycloak.accessDenied(request, response, next);
console.error('Could not obtain grant code: ' + err);
});
};
Expand Down

0 comments on commit 25141a5

Please sign in to comment.