From 3d913747992d544abce30c05a29a3644382f7ad1 Mon Sep 17 00:00:00 2001 From: Diu Date: Wed, 26 Apr 2023 01:25:56 +0800 Subject: [PATCH] fix: verifySignature error on docker, fix #384 --- src/utils/auth.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/auth.ts b/src/utils/auth.ts index cba117a20..21197e55e 100644 --- a/src/utils/auth.ts +++ b/src/utils/auth.ts @@ -17,7 +17,7 @@ async function digestMessage(message: string) { export const generateSignature = async(payload: AuthPayload) => { const { t: timestamp, m: lastMessage } = payload - const secretKey = import.meta.env.PUBLIC_SECRET_KEY as string + const secretKey = import.meta.env.PUBLIC_SECRET_KEY as string || '' const signText = `${timestamp}:${lastMessage}:${secretKey}` // eslint-disable-next-line no-return-await return await digestMessage(signText)