Skip to content

Commit

Permalink
Fix: Get oidcClientId from env vars to run locally with different Key…
Browse files Browse the repository at this point in the history
…Cloak client (#129)

fix: get oidcClientId from env vars to run locally with different KeyCloak client
  • Loading branch information
mrsauravsahu committed May 12, 2024
1 parent a1a401c commit 821ee43
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions apps/ui/src/src/routes/callback/+page.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ import { env } from '$env/dynamic/private';
/** @type {import('./$types').PageLoad} */
export function load() {
return {
data: {
oidcClientId: env.OIDC_CLIENT_ID
},
urls: {
oidcUrl: env.OIDC_TENANT_URL,
ownUrl: env.OWN_URL
Expand Down
2 changes: 1 addition & 1 deletion apps/ui/src/src/routes/callback/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
if (code === null) throw redirect(301, "/login");
let encodedParams = new URLSearchParams({
client_id: "payobills",
client_id: data.data.oidcClientId,
redirect_uri: `${data.urls.ownUrl}/callback`,
grant_type: "authorization_code",
scope: "openid",
Expand Down

0 comments on commit 821ee43

Please sign in to comment.