Skip to content

Commit 9e2c8ac

Browse files
committed
Add Changeset
1 parent e57bf23 commit 9e2c8ac

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.changeset/fast-cougars-unite.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"discord-verify": minor
3+
---
4+
5+
Adds AWS Verify Export

packages/discord-verify/src/aws.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// AWS lambda requires an explicit crypto import.
22
// eslint-disable-next-line @typescript-eslint/ban-ts-comment, @typescript-eslint/prefer-ts-expect-error
33
// @ts-ignore-error We can't use Node types since we aren't fully in a Node environment
4-
import crypto from "crypto";
4+
import crypto from "node:crypto";
55
import { PlatformAlgorithm, verify } from "./lib/verify.js";
66

77
export interface AWSGatewayEvent {
@@ -33,7 +33,7 @@ export async function isValid(
3333
timestamp,
3434
publicKey,
3535
crypto.webcrypto.subtle,
36-
algorithm ?? PlatformAlgorithm.OldNode
36+
algorithm ?? PlatformAlgorithm.NewNode
3737
);
3838
} catch (error: unknown) {
3939
if (error instanceof Error && error.constructor.name === "DOMException") {

0 commit comments

Comments
 (0)