-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
API: Export keycloak config into a keycloak.json (remove hard coded config) #41
Comments
Pull Request
Solution
config-overrides.js module.exports = override(
...
// Add Webpack alias for Keycloak configuration based on the environment
(config) => {
const isProduction = process.env.NODE_ENV === 'production';
// Define the path to the correct keycloak-config based on the environment
config.resolve.alias['keycloak-config'] = path.resolve(
__dirname,
isProduction
? 'src/keycloak-config.prod.json' // Production environment
: 'src/keycloak-config.json' // Development environment
);
// Return the modified Webpack config
return config;
}
);
src/keycloak-config.json {
"config": {
"realm": "gaia-x",
"clientId": "portal",
},
"initOptions": {
"onLoad": "check-sso",
"checkLoginIframe": false,
"pkceMethod": "S256"
}
}
...
REACT_APP_KEYCLOAK_API_URL=https://fc-keycloak.gxfs.gx4fm.org/
... |
devbysp
pushed a commit
that referenced
this issue
Sep 30, 2024
Depending on the environment the app loads the corresponding json config file. It is controlled by the webpack, see: 'config-overrides.js' Signed-off-by: Zoltan Magyari <[email protected]>
devbysp
pushed a commit
that referenced
this issue
Oct 7, 2024
Depending on the environment the app loads the corresponding json config file. It is controlled by the webpack, see: 'config-overrides.js' Signed-off-by: Zoltan Magyari <[email protected]>
devbysp
pushed a commit
that referenced
this issue
Oct 8, 2024
Depending on the environment the app loads the corresponding json config file. It is controlled by the webpack, see: 'config-overrides.js' Signed-off-by: Zoltan Magyari <[email protected]>
This was referenced Oct 8, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
src/context/AuthContextProvider.tsx
https://my.msg-david.de/confluence/display/GAIAX/PoC%3A+Authentication+via+Keycloak
The text was updated successfully, but these errors were encountered: