Skip to content

Commit ae213f2

Browse files
committed
fix: use specific env for autologin in UI (#150)
* fix: use specific env for autologin in UI Signed-off-by: Tomas Weiss <tomas.weiss2@gmail.com> * chore: use existing var Signed-off-by: Tomas Weiss <tomas.weiss2@gmail.com> --------- Signed-off-by: Tomas Weiss <tomas.weiss2@gmail.com>
1 parent e07e4c0 commit ae213f2

3 files changed

Lines changed: 6 additions & 2 deletions

File tree

apps/adk-ui/src/contexts/App/runtime-config.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ export const runtimeConfig: RuntimeConfig = {
2222
defaults: contextTokenPermissionsDefaults,
2323
}),
2424
isAuthEnabled: process.env.OIDC_ENABLED !== 'false',
25-
isLocalDevAutoLogin:
26-
process.env.OIDC_ENABLED !== 'false' && (process.env.OIDC_PROVIDER_ISSUER?.includes('localtest.me') ?? false),
25+
isLocalDevAutoLogin: process.env.LOCAL_DEV_AUTO_LOGIN === 'true',
2726
appName: process.env.APP_NAME || 'Kagenti ADK',
2827
};

apps/adk-ui/template.env

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ OIDC_PROVIDER_ISSUER=http://keycloak.localtest.me:8080
3333
# defaults to OIDC_PROVIDER_ISSUER if not set — only needed when internal and public URLs differ (e.g. dev mode)
3434
OIDC_PROVIDER_EXTERNAL_ISSUER=http://keycloak.localtest.me:8080
3535

36+
# Enable auto-login for local dev (default: false)
37+
LOCAL_DEV_AUTO_LOGIN=false
38+
3639
# next-auth random string
3740
NEXTAUTH_SECRET=
3841
NEXTAUTH_URL="http://adk.localtest.me:8080"

helm/templates/ui/deployment.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ spec:
5555
{{- toYaml . | nindent 12 }}
5656
{{- end }}
5757
env:
58+
- name: LOCAL_DEV_AUTO_LOGIN
59+
value: {{ .Values.features.uiLocalSetup | quote }}
5860
- name: API_URL
5961
value: "http://adk-server-svc:{{.Values.server.service.port}}"
6062
- name: APP_NAME

0 commit comments

Comments
 (0)