amazon-connect / amazon-connect-message-streaming-examples

This repository contains an example project on how to get started with Amazon Connect Chat Message Streaming APIs to enable SMS and Facebook messenger channels for customer service.
MIT No Attribution
23 stars 39 forks source link

The signature is not detected correctly because the type is incorrect. #5

Closed intptr-t closed 2 years ago

intptr-t commented 2 years ago

The return value of fb.validateRequest(...) is a Promise, so await is required. If there is no "await", the signature detection will always succeed. (if (!validRequest) will be determined to be false)

caller https://github.com/amazon-connect/amazon-connect-message-streaming-examples/blob/f5f8712e581ccc44ee5c6d40ea5df2874cb506c0/src/lambda/inboundMessageHandler/index.js#L30

callee https://github.com/amazon-connect/amazon-connect-message-streaming-examples/blob/f5f8712e581ccc44ee5c6d40ea5df2874cb506c0/src/lambda/inboundMessageHandler/lib/handlers/facebook.js#L143

kqia040 commented 2 years ago

Closing issue as the PR is merged