mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-10-21 07:01:16 +02:00
fix: encrypt stored GitHub credentials (#797)
This commit is contained in:
1 parent
b070d7e281
commit
3fb376dd53
32 files changed
+1098
-188
No files matched your search
@@ -2,6 +2,9 @@ import { resolve } from "path";
|
||||
import { randomBytes } from "crypto";
|
||||
|
||||
interface Config {
|
||||
CREDENTIAL_KEYS: string;
|
||||
CREDENTIAL_ACTIVE_KEY_ID: string;
|
||||
CREDENTIAL_LEGACY_READS: boolean;
|
||||
SESSION_SECRET: string;
|
||||
REDIS_PORT: number;
|
||||
REDIS_HOSTNAME: string;
|
||||
@@ -55,6 +58,9 @@ const config: Config = {
|
||||
// Predictable defaults are dangerous: a known SESSION_SECRET lets anyone
|
||||
// forge session cookies. Default to empty and resolve below — random in
|
||||
// dev, required in production. See the post-env block.
|
||||
CREDENTIAL_KEYS: "",
|
||||
CREDENTIAL_ACTIVE_KEY_ID: "",
|
||||
CREDENTIAL_LEGACY_READS: false,
|
||||
SESSION_SECRET: "",
|
||||
CLIENT_ID: "CLIENT_ID",
|
||||
CLIENT_SECRET: "CLIENT_SECRET",
|
||||
|
||||
Reference in new issue
Block a user