This commit is contained in:
parent
4c2f041d8b
commit
c8653e8320
|
@ -26,7 +26,7 @@
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"evt": "^2.4.15",
|
"evt": "^2.4.15",
|
||||||
"oidc-spa": "^3.0.3",
|
"oidc-spa": "^3.0.3",
|
||||||
"keycloakify": "^9.1.6",
|
"keycloakify": "^9.1.7",
|
||||||
"powerhooks": "^0.26.8",
|
"powerhooks": "^0.26.8",
|
||||||
"react": "18.1.0",
|
"react": "18.1.0",
|
||||||
"react-dom": "18.1.0",
|
"react-dom": "18.1.0",
|
||||||
|
|
|
@ -3,8 +3,7 @@ import { lazy, Suspense } from "react";
|
||||||
import type { PageProps } from "keycloakify/account";
|
import type { PageProps } from "keycloakify/account";
|
||||||
import type { KcContext } from "./kcContext";
|
import type { KcContext } from "./kcContext";
|
||||||
import { useI18n } from "./i18n";
|
import { useI18n } from "./i18n";
|
||||||
|
import Template from "./Template";
|
||||||
const Template = lazy(() => import("./Template"));
|
|
||||||
|
|
||||||
const Password = lazy(() => import("./pages/Password"));
|
const Password = lazy(() => import("./pages/Password"));
|
||||||
const MyExtraPage1 = lazy(() => import("./pages/MyExtraPage1"));
|
const MyExtraPage1 = lazy(() => import("./pages/MyExtraPage1"));
|
||||||
|
|
|
@ -3,9 +3,7 @@ import { lazy, Suspense } from "react";
|
||||||
import Fallback, { type PageProps } from "keycloakify/login";
|
import Fallback, { type PageProps } from "keycloakify/login";
|
||||||
import type { KcContext } from "./kcContext";
|
import type { KcContext } from "./kcContext";
|
||||||
import { useI18n } from "./i18n";
|
import { useI18n } from "./i18n";
|
||||||
|
import Template from "./Template";
|
||||||
const Template = lazy(() => import("./Template"));
|
|
||||||
const DefaultTemplate = lazy(() => import("keycloakify/login/Template"));
|
|
||||||
|
|
||||||
const Login = lazy(() => import("./pages/Login"));
|
const Login = lazy(() => import("./pages/Login"));
|
||||||
// If you can, favor register-user-profile.ftl over register.ftl, see: https://docs.keycloakify.dev/realtime-input-validation
|
// If you can, favor register-user-profile.ftl over register.ftl, see: https://docs.keycloakify.dev/realtime-input-validation
|
||||||
|
@ -50,10 +48,20 @@ export default function KcApp(props: { kcContext: KcContext; }) {
|
||||||
case "register.ftl": return <Register {...{ kcContext, i18n, Template, classes }} doUseDefaultCss={true} />;
|
case "register.ftl": return <Register {...{ kcContext, i18n, Template, classes }} doUseDefaultCss={true} />;
|
||||||
case "register-user-profile.ftl": return <RegisterUserProfile {...{ kcContext, i18n, Template, classes }} doUseDefaultCss={true} />
|
case "register-user-profile.ftl": return <RegisterUserProfile {...{ kcContext, i18n, Template, classes }} doUseDefaultCss={true} />
|
||||||
case "terms.ftl": return <Terms {...{ kcContext, i18n, Template, classes }} doUseDefaultCss={true} />;
|
case "terms.ftl": return <Terms {...{ kcContext, i18n, Template, classes }} doUseDefaultCss={true} />;
|
||||||
|
// Removes those pages in you project. They are included to show you how to implement keycloak pages
|
||||||
|
// that are not yes implemented by Keycloakify.
|
||||||
|
// See: https://docs.keycloakify.dev/limitations#some-pages-still-have-the-default-theme.-why
|
||||||
case "my-extra-page-1.ftl": return <MyExtraPage1 {...{ kcContext, i18n, Template, classes }} doUseDefaultCss={true} />;
|
case "my-extra-page-1.ftl": return <MyExtraPage1 {...{ kcContext, i18n, Template, classes }} doUseDefaultCss={true} />;
|
||||||
case "my-extra-page-2.ftl": return <MyExtraPage2 {...{ kcContext, i18n, Template, classes }} doUseDefaultCss={true} />;
|
case "my-extra-page-2.ftl": return <MyExtraPage2 {...{ kcContext, i18n, Template, classes }} doUseDefaultCss={true} />;
|
||||||
// We choose to use the default Template for the Info page and to download the theme resources.
|
// We choose to use the default Template for the Info page and to download the theme resources.
|
||||||
case "info.ftl": return <Info {...{ kcContext, i18n, classes }} Template={DefaultTemplate} doUseDefaultCss={true} />;
|
// This is just an example to show you what is possible. You likely don't want to keep this as is.
|
||||||
|
case "info.ftl": return (
|
||||||
|
<Info
|
||||||
|
{...{ kcContext, i18n, classes }}
|
||||||
|
Template={lazy(() => import("keycloakify/login/Template"))}
|
||||||
|
doUseDefaultCss={true}
|
||||||
|
/>
|
||||||
|
);
|
||||||
default: return <Fallback {...{ kcContext, i18n, classes }} Template={Template} doUseDefaultCss={true} />;
|
default: return <Fallback {...{ kcContext, i18n, classes }} Template={Template} doUseDefaultCss={true} />;
|
||||||
}
|
}
|
||||||
})()}
|
})()}
|
||||||
|
|
|
@ -9760,10 +9760,10 @@ jwt-decode@^3.1.2:
|
||||||
resolved "https://registry.yarnpkg.com/jwt-decode/-/jwt-decode-3.1.2.tgz#3fb319f3675a2df0c2895c8f5e9fa4b67b04ed59"
|
resolved "https://registry.yarnpkg.com/jwt-decode/-/jwt-decode-3.1.2.tgz#3fb319f3675a2df0c2895c8f5e9fa4b67b04ed59"
|
||||||
integrity sha512-UfpWE/VZn0iP50d8cz9NrZLM9lSWhcJ+0Gt/nm4by88UL+J1SiKN8/5dkjMmbEzwL2CAe+67GsegCbIKtbp75A==
|
integrity sha512-UfpWE/VZn0iP50d8cz9NrZLM9lSWhcJ+0Gt/nm4by88UL+J1SiKN8/5dkjMmbEzwL2CAe+67GsegCbIKtbp75A==
|
||||||
|
|
||||||
keycloakify@^9.1.6:
|
keycloakify@^9.1.7:
|
||||||
version "9.1.6"
|
version "9.1.7"
|
||||||
resolved "https://registry.yarnpkg.com/keycloakify/-/keycloakify-9.1.6.tgz#2d7a633e7727c44afaeec6b2ef98956540097db4"
|
resolved "https://registry.yarnpkg.com/keycloakify/-/keycloakify-9.1.7.tgz#da411b974edb88abb8c16b80ec2d69cc46e657eb"
|
||||||
integrity sha512-OXmW47gGtrtBVolYi/VqMOAxHEAl0tnm1sWaVxFBJQHxAMgX7soV8tTF/fvPwEQpi+BshBQe+wgCXCVfqzKgkA==
|
integrity sha512-0yd8EHZ4WGCHGXc0tlVMuUpq6wspeY/PPJup9TFKMPHCQnghpfKH4jyM7yPdv2HD7QyVT7FRfD8l2g4L55ysVw==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@babel/generator" "^7.22.9"
|
"@babel/generator" "^7.22.9"
|
||||||
"@babel/parser" "^7.22.7"
|
"@babel/parser" "^7.22.7"
|
||||||
|
|
Loading…
Reference in a new issue