update JWT_SECRET to JWT_SECRET_KEY

This commit is contained in:
akdeb 2025-04-23 12:53:53 +01:00
parent c14929dc58
commit c4743896a4
3 changed files with 4 additions and 4 deletions

View file

@ -1,7 +1,7 @@
# Supabase keys # Supabase keys
SUPABASE_URL=http://127.0.0.1:54321 SUPABASE_URL=http://127.0.0.1:54321
SUPABASE_KEY=<SUPABASE_KEY> SUPABASE_KEY=<SUPABASE_KEY>
JWT_SECRET=super-secret-jwt-token-with-at-least-32-characters-long JWT_SECRET_KEY=super-secret-jwt-token-with-at-least-32-characters-long
# Encryption Key (useful for encrypting secrets in the database) # Encryption Key (useful for encrypting secrets in the database)
ENCRYPTION_KEY=<ENCRYPTION_KEY> ENCRYPTION_KEY=<ENCRYPTION_KEY>

View file

@ -9,9 +9,9 @@ export const authenticateUser = async (
authToken: string, authToken: string,
): Promise<IUser> => { ): Promise<IUser> => {
try { try {
const jwtSecret = Deno.env.get("JWT_SECRET"); const jwtSecret = Deno.env.get("JWT_SECRET_KEY");
if (!jwtSecret) throw new Error("JWT_SECRET not configured"); if (!jwtSecret) throw new Error("JWT_SECRET_KEY not configured");
console.log("jwtSecret", jwtSecret); console.log("jwtSecret", jwtSecret);
const secretBytes = new TextEncoder().encode(jwtSecret); const secretBytes = new TextEncoder().encode(jwtSecret);

View file

@ -37,7 +37,7 @@
``` ```
SUPABASE_URL=http://127.0.0.1:54321 SUPABASE_URL=http://127.0.0.1:54321
SUPABASE_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9... SUPABASE_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
JWT_SECRET=super-secret-jwt-token-with-at-least-32-characters-long JWT_SECRET_KEY=super-secret-jwt-token-with-at-least-32-characters-long
``` ```
## Tables chart ## Tables chart