Skip to content

Implement payload verification using WebCrypto API #12

Open
@gr2m

Description

@gr2m

The payload verification is currently implemented using node's built-in crypto module:

preview-sdk.js/index.js

Lines 17 to 19 in 06310d7

return createVerify("SHA256")
.update(rawBody)
.verify(key, signature, "base64");

But all modern JS run time environments now have the global crypto API which is WebCrypto - including Node.js.

For compatibility with @octokit which aims to be as universal as possible, we should implement that method using WebCrypto.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

featureNew feature or requestpull request welcomeIssue is actionable and anyone can claim it

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions