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

Adding custom field to user attributes and registration form #50

Closed
nvegater opened this issue Nov 10, 2021 · 3 comments
Closed

Adding custom field to user attributes and registration form #50

nvegater opened this issue Nov 10, 2021 · 3 comments

Comments

@nvegater
Copy link

Hi, first of all thank you for this amazing project. I agree with all your motivations :).

Which branch is the right one for me to start ?

  • I have a keycloak server already running.
  • I want to add a custom theme extending "keycloak" theme
  • Add a select field to the registration form to add a custom user attribute.

"look_and_feel" branch ?
demo branch ?

I started with the "look_and_feel" following "advanced usage" following this guide.

Replaces those lines by const kcContext = realKcContext ?? kcContextMocks.kcLoginContext;, now if you run yarn start you will be able to debug the login page, replace kcLoginContext by kcRegisterContext and the register page will be loaded instead.

This point doesnt apply for the code of the "look_and_feel" branch though.

You see my confusion ? Otherwise let me know and I can try to explain it in other way :)

Thank you!

@garronej
Copy link
Collaborator

Sorry, I don't have time to look at your issue in depth now but I just want to tell you that, as for right now the pattern validation in user attribute is broken.
I hope to fix it today but just in case you'd run against a brick wall...;

@nvegater
Copy link
Author

Thanks for answering.

I just deployed a custom attribute select field like this. I'll let you know if that works :)

@garronej
Copy link
Collaborator

garronej commented Nov 10, 2021

Oh yeah this will definitely work.
We used to do that with email if I am not mistaking.
Checkout that (and that for testing outside of keycloak).
But we gave up this approach in favour of the newer and greater "user attribute" feature:

In the gif you see that I define a regular expression that define what is a valid email. But you can also add other fields.

ref

The intefration of this Keyclaok feature is what's I am saying is half broken still. But I will fix it asap!

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

2 participants