Rework client OIDC env vars: rename to VITE_OIDC_*, add committed .env

Renames VITE_AUTH_* to VITE_OIDC_* to match the stack convention.
Adds a dedicated VITE_OIDC_POST_LOGOUT_REDIRECT_URI instead of deriving
it from the redirect URI via string replace. Switches from Dockerfile
ARG/ENV to a committed src/Budget.Client/.env so Vite picks up
production values at build time without needing build-arg overrides.
.env.local is gitignored for localhost dev overrides.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Spencer Twaddle
2026-05-02 15:57:52 -05:00
parent cd42a8ec2c
commit 4dc5ad4910
5 changed files with 14 additions and 17 deletions
+4
View File
@@ -0,0 +1,4 @@
VITE_OIDC_AUTHORITY=https://auth.stwaddle.com
VITE_OIDC_CLIENT_ID=budget-client
VITE_OIDC_REDIRECT_URI=https://budget.stwaddle.com/callback
VITE_OIDC_POST_LOGOUT_REDIRECT_URI=https://budget.stwaddle.com
+4 -4
View File
@@ -1,11 +1,11 @@
import type { UserManagerSettings } from 'oidc-client-ts';
export const authConfig: UserManagerSettings = {
authority: import.meta.env.VITE_AUTH_AUTHORITY,
client_id: import.meta.env.VITE_AUTH_CLIENT_ID,
redirect_uri: import.meta.env.VITE_AUTH_REDIRECT_URI,
authority: import.meta.env.VITE_OIDC_AUTHORITY,
client_id: import.meta.env.VITE_OIDC_CLIENT_ID,
redirect_uri: import.meta.env.VITE_OIDC_REDIRECT_URI,
response_type: 'code',
scope: 'openid profile email offline_access budget_api',
post_logout_redirect_uri: import.meta.env.VITE_AUTH_REDIRECT_URI?.replace('/callback', ''),
post_logout_redirect_uri: import.meta.env.VITE_OIDC_POST_LOGOUT_REDIRECT_URI,
automaticSilentRenew: true,
};