diff --git a/server-deno/.env.example b/server-deno/.env.example index 709080b..3387bd5 100644 --- a/server-deno/.env.example +++ b/server-deno/.env.example @@ -1,7 +1,7 @@ # Supabase keys SUPABASE_URL=http://127.0.0.1:54321 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= diff --git a/server-deno/utils.ts b/server-deno/utils.ts index e0fd09e..675daf3 100644 --- a/server-deno/utils.ts +++ b/server-deno/utils.ts @@ -9,9 +9,9 @@ export const authenticateUser = async ( authToken: string, ): Promise => { 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); const secretBytes = new TextEncoder().encode(jwtSecret); diff --git a/supabase/README.md b/supabase/README.md index b64ee17..be332a5 100644 --- a/supabase/README.md +++ b/supabase/README.md @@ -37,7 +37,7 @@ ``` SUPABASE_URL=http://127.0.0.1:54321 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