mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-06-26 21:39:43 +02:00
Merge pull request #1544 from AnishSarkar22/fix/login-button
feat: update authentication defaults to LOCAL
This commit is contained in:
commit
2148053569
3 changed files with 5 additions and 5 deletions
|
|
@ -762,7 +762,7 @@ class Config:
|
|||
TURNSTILE_SECRET_KEY = os.getenv("TURNSTILE_SECRET_KEY", "")
|
||||
|
||||
# Auth
|
||||
AUTH_TYPE = os.getenv("AUTH_TYPE")
|
||||
AUTH_TYPE = os.getenv("AUTH_TYPE", "LOCAL")
|
||||
REGISTRATION_ENABLED = os.getenv("REGISTRATION_ENABLED", "TRUE").upper() == "TRUE"
|
||||
|
||||
# Google OAuth
|
||||
|
|
|
|||
|
|
@ -8,9 +8,9 @@
|
|||
|
||||
import packageJson from "../package.json";
|
||||
|
||||
// Build-time fallback for packaged clients. Docker runtime reads plain AUTH_TYPE
|
||||
// through the runtime config provider first, then falls back to this baked value.
|
||||
export const BUILD_TIME_AUTH_TYPE = process.env.NEXT_PUBLIC_AUTH_TYPE || "GOOGLE";
|
||||
// Build-time fallback for packaged clients. Docker/runtime deployments default to
|
||||
// local auth unless AUTH_TYPE/NEXT_PUBLIC_AUTH_TYPE explicitly selects Google.
|
||||
export const BUILD_TIME_AUTH_TYPE = process.env.NEXT_PUBLIC_AUTH_TYPE || "LOCAL";
|
||||
|
||||
// Backend API URL. An empty string is valid in proxy mode and means
|
||||
// same-origin relative requests (e.g. /api/v1/... and /auth/...).
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ export type RuntimeAuthUiMode = "GOOGLE" | "LOCAL";
|
|||
|
||||
export function resolveRuntimeAuthUiMode(
|
||||
value: string | null | undefined,
|
||||
fallback: string | null | undefined = "GOOGLE"
|
||||
fallback: string | null | undefined = "LOCAL"
|
||||
): RuntimeAuthUiMode {
|
||||
const candidate = value?.trim().toUpperCase();
|
||||
if (candidate === "GOOGLE") return "GOOGLE";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue