From 4b9ccc061cdce31d221c6e514097aca141499926 Mon Sep 17 00:00:00 2001 From: Joseph Garrone Date: Mon, 4 Dec 2023 13:44:08 +0100 Subject: [PATCH] Do not use oidc-spa in the theme --- src/keycloak-theme/login/pages/Login.tsx | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/keycloak-theme/login/pages/Login.tsx b/src/keycloak-theme/login/pages/Login.tsx index abc250b..00375fa 100644 --- a/src/keycloak-theme/login/pages/Login.tsx +++ b/src/keycloak-theme/login/pages/Login.tsx @@ -5,18 +5,13 @@ import type { PageProps } from "keycloakify/login/pages/PageProps"; import { useGetClassName } from "keycloakify/login/lib/useGetClassName"; import type { KcContext } from "../kcContext"; import type { I18n } from "../i18n"; -import { retrieveQueryParamFromUrl } from "oidc-spa/tools/urlQueryParams"; -const result = retrieveQueryParamFromUrl({ - "url": window.location.href, - "name": "my_custom_param", -}); +const my_custom_param= new URL(window.location.href).searchParams.get("my_custom_param"); -if (result.wasPresent) { - console.log("my_custom_param", result.value); +if (my_custom_param !== null) { + console.log("my_custom_param:", my_custom_param); } - export default function Login(props: PageProps, I18n>) { const { kcContext, i18n, doUseDefaultCss, Template, classes } = props;