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: {