Skip to content
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

Handle theme for custom auth components #44

Open
Nathanael-Mtd opened this issue Feb 27, 2025 · 6 comments
Open

Handle theme for custom auth components #44

Nathanael-Mtd opened this issue Feb 27, 2025 · 6 comments

Comments

@Nathanael-Mtd
Copy link

I use that plugin https://github.com/p2-inc/keycloak-magic-link to handle email OTP login, but the theme page for that component use the default keycloak theme instead of using Tailcloakify one. I think the issue is present with other custom auth components.

I think it's linked to the missing/not generated template.ftl file.

On Tailcloakify :
Image

On Keywind (yes, buttons are not rendered) :
Image

@waynemorphic
Copy link

Hey @Nathanael-Mtd. template.ftl is handled via template.tsx file in Tailcloakify. However, other ftl files generated from Keycloak are handled/styled individually as components. That's why custom pages from third-party plugins will default to the Keycloak theme since they do not originate from Keycloak. Not sure how Keywind handled this. Please share how Keywind handled it. Thank you

@Nathanael-Mtd
Copy link
Author

@waynemorphic
Copy link

waynemorphic commented Feb 27, 2025

@Nathanael-Mtd. Are you able to pick this up?

@Nathanael-Mtd
Copy link
Author

@waynemorphic I don't find in Keycloakify how to generate that template.ftl file 😒
But maybe we can add OtpForm page to handle the needs of the PhaseTwo OTP module
: https://docs.keycloakify.dev/features/styling-a-custom-page-not-included-in-base-keycloak ?

@paulwer
Copy link

paulwer commented Feb 28, 2025

Hi @Nathanael-Mtd,
we descided to support p2-inc magic link plugin, because we will also use it in our system.
If you like, please contribute to the stylings, as of my latest implementation was just a quick start to get support for this page quickly.

#46 + #47

We should definatly look into the template.ftl page as well.
I have created an keycloakify issue for this, because i think keycloakify should add this first an we can will adopt the default way, if they descide to implement it:
keycloakify/keycloakify#804

@Nathanael-Mtd
Copy link
Author

Hi @paulwer !
Oh great, thank you for that add !

I think about changing the OTP form to use the same form we can found on LoginOtp.tsx, it's nicer and because p2-int dosen't offer the possibility to change the format (number or characters or use of letters instead of digits), I don't think it's an issue.
I can make the PR for that if it's seems OK for you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants