mirror of
https://github.com/willchen96/mike.git
synced 2026-07-04 22:02:12 +02:00
fix: update encryption key retrieval to use only USER_API_KEYS_ENCRYPTION_SECRET; remove supabase secret key fallback
This commit is contained in:
parent
4290104cd0
commit
b4ba274264
1 changed files with 2 additions and 5 deletions
|
|
@ -37,12 +37,9 @@ export function hasEnvApiKey(provider: ApiKeyProvider): boolean {
|
|||
}
|
||||
|
||||
function encryptionKey(): Buffer {
|
||||
const secret =
|
||||
process.env.USER_API_KEYS_ENCRYPTION_SECRET ||
|
||||
process.env.API_KEYS_ENCRYPTION_SECRET ||
|
||||
process.env.SUPABASE_SECRET_KEY;
|
||||
const secret = process.env.USER_API_KEYS_ENCRYPTION_SECRET;
|
||||
if (!secret) {
|
||||
throw new Error("API key encryption secret is not configured");
|
||||
throw new Error("USER_API_KEYS_ENCRYPTION_SECRET is not configured");
|
||||
}
|
||||
return crypto.createHash("sha256").update(secret).digest();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue