We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent da6cfd3 commit 1c3ccf8Copy full SHA for 1c3ccf8
src/lib/server/secret.ts
@@ -7,11 +7,12 @@ export async function validateSecret(secret: string): Promise<boolean> {
7
throw new Error('Invalid secret');
8
}
9
10
+ const secretEnv = env.SECRET;
11
// Assert that the secret env exists
- if (env.SECRET === null || env.SECRET === undefined || env.SECRET === '') {
12
+ if (secretEnv === null || secretEnv === undefined || secretEnv === '') {
13
throw new Error('SECRET env is not defined or empty string');
14
15
- const secretHash = await hashPassword(env.SECRET);
16
+ const secretHash = await hashPassword(secretEnv);
17
return await verifyPasswordHash(secretHash, secret);
18
0 commit comments