casen
casen
CCConvex Community
Created by casen on 2/28/2024 in #support-community
Issue using crypto functions in http actions to verify slack web hooks
Hello everyone! I recently wrote a socket-mode slack app in golang to have a little fun, and after learning about convex I wanted to do the same. Receiving webhooks from slack is no problem, but I've had a few issues trying to verify the raw slack payloads before taking any action on them. Assuming slack/bolt would not work in Convex runtime, I thought I'd test out slack-edge. Unfortunately that is using some functionality not supported by the Convex runtime.
failure
Not implemented: verify for SubtleCrypto. Consider calling an action defined in Node.js instead (https://docs.convex.dev/functions/actions).
at verifySlackRequest (../node_modules/slack-edge/src/request/request-verification.ts:34:0)
at async handleEventRequest [as handleEventRequest] (../node_modules/slack-edge/src/app.ts:555:36)
at async run [as run] (../node_modules/slack-edge/src/app.ts:505:2)
at async Array.<anonymous> (../convex/http.ts:37:16)
at async <anonymous> (../../convex/lib/honoWithConvex.ts:70:5)
failure
Not implemented: verify for SubtleCrypto. Consider calling an action defined in Node.js instead (https://docs.convex.dev/functions/actions).
at verifySlackRequest (../node_modules/slack-edge/src/request/request-verification.ts:34:0)
at async handleEventRequest [as handleEventRequest] (../node_modules/slack-edge/src/app.ts:555:36)
at async run [as run] (../node_modules/slack-edge/src/app.ts:505:2)
at async Array.<anonymous> (../convex/http.ts:37:16)
at async <anonymous> (../../convex/lib/honoWithConvex.ts:70:5)
Anyone have some pointers about how to use crypto in the Convex runtime? I am assuming the above call is about using the signing secret to verify the request.
16 replies