Skip to content

Commit 5321872

Browse files
committed
Return empty values for production mode
1 parent e200da7 commit 5321872

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

samples/apps/oauth/src/config.tsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,15 @@ const getConfigValue = (runtimeValue: string | undefined, envValue: string | und
5151
};
5252

5353
const config = {
54-
applicationID: getConfigValue(runtimeConfig.applicationID, import.meta.env.VITE_REACT_APP_AUTH_APP_ID),
55-
applicationsEndpoint: getConfigValue(runtimeConfig.applicationsEndpoint, import.meta.env.VITE_REACT_APPLICATIONS_ENDPOINT),
56-
flowEndpoint: getConfigValue(runtimeConfig.flowEndpoint, import.meta.env.VITE_REACT_APP_SERVER_FLOW_ENDPOINT),
57-
authorizationEndpoint: getConfigValue(runtimeConfig.authorizationEndpoint, import.meta.env.VITE_REACT_APP_SERVER_AUTHORIZATION_ENDPOINT),
58-
tokenEndpoint: getConfigValue(runtimeConfig.tokenEndpoint, import.meta.env.VITE_REACT_APP_SERVER_TOKEN_ENDPOINT),
59-
clientId: import.meta.env.VITE_REACT_APP_CLIENT_ID,
60-
clientSecret: import.meta.env.VITE_REACT_APP_CLIENT_SECRET,
61-
redirectUri: getConfigValue(runtimeConfig.redirectUri, import.meta.env.VITE_REACT_APP_REDIRECT_URI),
62-
scope: import.meta.env.VITE_REACT_APP_SCOPE
54+
applicationID: getConfigValue(runtimeConfig.applicationID, import.meta.env.VITE_REACT_APP_AUTH_APP_ID) || '',
55+
applicationsEndpoint: getConfigValue(runtimeConfig.applicationsEndpoint, import.meta.env.VITE_REACT_APPLICATIONS_ENDPOINT) || '',
56+
flowEndpoint: getConfigValue(runtimeConfig.flowEndpoint, import.meta.env.VITE_REACT_APP_SERVER_FLOW_ENDPOINT) || '',
57+
authorizationEndpoint: getConfigValue(runtimeConfig.authorizationEndpoint, import.meta.env.VITE_REACT_APP_SERVER_AUTHORIZATION_ENDPOINT) || '',
58+
tokenEndpoint: getConfigValue(runtimeConfig.tokenEndpoint, import.meta.env.VITE_REACT_APP_SERVER_TOKEN_ENDPOINT) || '',
59+
clientId: import.meta.env.VITE_REACT_APP_CLIENT_ID || '',
60+
clientSecret: import.meta.env.VITE_REACT_APP_CLIENT_SECRET || '',
61+
redirectUri: getConfigValue(runtimeConfig.redirectUri, import.meta.env.VITE_REACT_APP_REDIRECT_URI) || '',
62+
scope: import.meta.env.VITE_REACT_APP_SCOPE || ''
6363
};
6464

6565
export default config;

0 commit comments

Comments
 (0)