Skip to content

Commit

Permalink
fix: Impersonated tokens do not work with webhooks (closes #854)
Browse files Browse the repository at this point in the history
  • Loading branch information
claustres committed May 14, 2024
1 parent 73584d2 commit e5b2340
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions core/api/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -287,14 +287,13 @@ export function createWebhook (path, app, options = {}) {
const payload = req.body
const config = app.get('authentication')
res.set('content-type', 'application/json')
const params = {}
const params = _.get(req, 'feathers', {})
try {
if (options.preprocessor) {
await options.preprocessor(req, res, payload)
}
// Authenticate when required
if (config) {
params.user = _.get(req, 'feathers.user')
params.checkAuthorisation = true
}
if (req.headers['content-type'] !== 'application/json') {
Expand Down

0 comments on commit e5b2340

Please sign in to comment.