Do not use oidc-spa in the theme

This commit is contained in:
Joseph Garrone 2023-12-04 13:44:08 +01:00
parent 81adb7c9c2
commit 4b9ccc061c

View file

@ -5,18 +5,13 @@ import type { PageProps } from "keycloakify/login/pages/PageProps";
import { useGetClassName } from "keycloakify/login/lib/useGetClassName"; import { useGetClassName } from "keycloakify/login/lib/useGetClassName";
import type { KcContext } from "../kcContext"; import type { KcContext } from "../kcContext";
import type { I18n } from "../i18n"; import type { I18n } from "../i18n";
import { retrieveQueryParamFromUrl } from "oidc-spa/tools/urlQueryParams";
const result = retrieveQueryParamFromUrl({ const my_custom_param= new URL(window.location.href).searchParams.get("my_custom_param");
"url": window.location.href,
"name": "my_custom_param",
});
if (result.wasPresent) { if (my_custom_param !== null) {
console.log("my_custom_param", result.value); console.log("my_custom_param:", my_custom_param);
} }
export default function Login(props: PageProps<Extract<KcContext, { pageId: "login.ftl" }>, I18n>) { export default function Login(props: PageProps<Extract<KcContext, { pageId: "login.ftl" }>, I18n>) {
const { kcContext, i18n, doUseDefaultCss, Template, classes } = props; const { kcContext, i18n, doUseDefaultCss, Template, classes } = props;