-
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
Fix: Get oidcClientId from env vars to run locally with different KeyCloak client #129
Conversation
WalkthroughThe recent update focuses on enhancing the configuration of the OpenID Connect (OIDC) client ID. The hardcoded client ID in the URLSearchParams within the callback route of the UI application has been replaced with a dynamic value fetched from the environment variables, improving flexibility and security. Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (2)
- apps/ui/src/src/routes/callback/+page.server.ts (1 hunks)
- apps/ui/src/src/routes/callback/+page.svelte (1 hunks)
Additional comments not posted (1)
apps/ui/src/src/routes/callback/+page.server.ts (1)
6-8
: LGTM! The dynamic assignment ofoidcClientId
from environment variables enhances configuration flexibility.
@@ -15,7 +15,7 @@ | |||
if (code === null) throw redirect(301, "/login"); | |||
|
|||
let encodedParams = new URLSearchParams({ | |||
client_id: "payobills", | |||
client_id: data.data.oidcClientId, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tip
Codebase Verification
The usage of data.data.oidcClientId
in apps/ui/src/src/routes/callback/+page.svelte
appears to be unique within the Svelte components of the application. This raises concerns about the consistency and correctness of the data object structure as described in the review comment. It is recommended to re-evaluate this implementation to ensure it aligns with the overall data handling strategy of the application.
- File:
apps/ui/src/src/routes/callback/+page.svelte
- Concern: Unique usage of
data.data.oidcClientId
might indicate an inconsistency or a misunderstanding of the data structure.
- Concern: Unique usage of
Analysis chain
LGTM! Ensure that the data
object structure (data.data.oidcClientId
) is correctly used throughout the application.
Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Verify the structure of the `data` object used in the Svelte component.
# Test: Search for the usage of `data.data` in the Svelte files. Expect: Consistent usage of the `data.data` structure.
rg --type svelte $'data.data'
Length of output: 59
Script:
#!/bin/bash
# Description: Re-verify the structure of the `data` object used in the Svelte component by searching for 'data.data' in files with the '.svelte' extension.
# Corrected command to search for the usage of `data.data` in Svelte files.
rg 'data.data' --glob '*.svelte'
Length of output: 124
impact surface