From 5c9c0cde60f3a24b431dce49fce83482040689e2 Mon Sep 17 00:00:00 2001 From: Katarina Date: Thu, 17 Jul 2025 17:52:24 +0200 Subject: [PATCH] Amend redirect URI --- src/auth/oidcConfig.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/auth/oidcConfig.ts b/src/auth/oidcConfig.ts index 260d15d..f6038ad 100644 --- a/src/auth/oidcConfig.ts +++ b/src/auth/oidcConfig.ts @@ -1,12 +1,16 @@ import type {UserManagerSettings} from "oidc-client-ts"; -export const oidcConfig : UserManagerSettings = { +const redirectUri = import.meta.env.PROD + ? "https://dex.smoothbrain.win" + : "http://localhost:5173"; + +export const oidcConfig: UserManagerSettings = { authority: 'https://auth.smoothbrain.win/application/o/dex/', client_id: 'K202NAqkgfjceLZr28gAVQgJDc6RjZfdrE1jNx0K', - redirect_uri: 'https://dex.smoothbrain.win/callback', + redirect_uri: `${redirectUri}/callback`, response_type: 'code', scope: 'openid profile email', - post_logout_redirect_uri: 'httpS://dex.smoothbrain.win', + post_logout_redirect_uri: redirectUri, loadUserInfo: true, automaticSilentRenew: true, extraQueryParams: {