File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
packages/discord-verify/src Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " discord-verify " : minor
3+ ---
4+
5+ Adds AWS Verify Export
Original file line number Diff line number Diff line change 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" ;
55import { PlatformAlgorithm , verify } from "./lib/verify.js" ;
66
77export 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" ) {
You can’t perform that action at this time.
0 commit comments