You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 23, 2019. It is now read-only.
Some hosting platforms (like Firebase Cloud) always parse the request body, and create the req.body property for convenience. Unfortunately, this prevents this library from being able to verify requests. However, there's a convention of placing the unparsed (but buffered) body on the req.rawBody property instead.
Using req.rawBody as a fallback for req.body during verification would allow users to deploy code using this package to more hosting platforms.
@aoberoi I forgot to create it :( Did make a PR for this issue. Cannot figure out how to get the coverage up though, tried numerous things but somehow it complains about the handleError function coverage. The tests do check the output of respond() on multiple occasions though.
Description
Some hosting platforms (like Firebase Cloud) always parse the request body, and create the
req.body
property for convenience. Unfortunately, this prevents this library from being able to verify requests. However, there's a convention of placing the unparsed (but buffered) body on thereq.rawBody
property instead.Using
req.rawBody
as a fallback forreq.body
during verification would allow users to deploy code using this package to more hosting platforms.This issue is analogous to one from the
@slack/events-api
package. The work can likely be cribbed from this PR.Requirements
The text was updated successfully, but these errors were encountered: