Could this use keycloak's own registration form? #8

Open
opened 2021-06-17 09:01:30 +00:00 by r · 4 comments
e.g. under https://login.server.org/auth/realms/my-realm/login-actions/registration
Owner

Curious as to why? You intially spoke of wanting to move away from that page for reasons which I can't quite remember now.

If you hit that URL with a typical HTTP GET, then there is an error, it expects a bunch of paramaters in the request, like the client ID and some tokens, I guess. I am not sure if it is possible but worth a look at some stage.

Curious as to why? You intially spoke of wanting to move away from that page for reasons which I can't quite remember now. If you hit that URL with a typical HTTP GET, then there is an error, it expects a bunch of paramaters in the request, like the client ID and some tokens, I guess. I am not sure if it is possible but worth a look at some stage.
Author

Bare KC only allows you to turn on / off registrations. I wanted to move away from that binary to the invite model.

So after clicking on invite link a new member would be redirected to the KC registration page and do the regular KC registration flow. They'd never see the collective portal app, unless they invite people themselves.

It seems logical to reuse that and not have to duplicate the work, also in terms of skinning etc. It would make the collective portal a more generalizable component.

But not sure you have sufficient paramaters to forward to the register component..

Bare KC only allows you to turn on / off registrations. I wanted to move away from that binary to the invite model. So after clicking on invite link a new member would be redirected to the KC registration page and do the regular KC registration flow. They'd never see the collective portal app, unless they invite people themselves. It seems logical to reuse that and not have to duplicate the work, also in terms of skinning etc. It would make the collective portal a more generalizable component. But not sure you have sufficient paramaters to forward to the register component..
Owner

So hmmmm, you would leave registrations turn on on the keycloak side but then hide this registration button on the keycloak theme... then use the portal to make a valid request to this registration URL? Not sure about the parameters indeed.

Theming on this portal side is super easy though, using https://git.autonomic.zone/autonomic-cooperative/keycloak-collective-portal/src/branch/main/keycloak_collective_portal/static and then switching it with the APP_THEME=... env var. I personally want to do as little as possible theming inside Keycloak because Java ;P

So hmmmm, you would leave registrations turn on on the keycloak side but then hide this registration button on the keycloak theme... then use the portal to make a valid request to this registration URL? Not sure about the parameters indeed. Theming on this portal side is super easy though, using https://git.autonomic.zone/autonomic-cooperative/keycloak-collective-portal/src/branch/main/keycloak_collective_portal/static and then switching it with the `APP_THEME=...` env var. I personally want to do as little as possible theming inside Keycloak because Java ;P
Author

So hmmmm, you would leave registrations turn on on the keycloak side but then hide this registration button on the keycloak theme... then use the portal to make a valid request to this registration URL? Not sure about the parameters indeed.

We'd have to find out if we can enable registrations without showing it in the login form. If there is no option, I can remove the if-statement from the login template. I'm getting used to the KC templates now :)

In case you do decide to stick to registration via the flask app:

  • Is there a check to see if the username and e-mail are already registered? How is this handled?

  • Right now it only asks for a password once and without any criterea, it is good practice to ask for a password of some decent length and ask for a double entry to make sure people did not make a mistake..

Finally, it would be handy to use the HMTL that KC uses for the registration so people can just copy pasta their KC template CSS in this app!

(all the above is the disadvantage of not using the built-in KC registration flow, and we might run in to more things down the line.)

The 'you've been invited by x' is a really nice touch of this form though and would be sad to lose.

> So hmmmm, you would leave registrations turn on on the keycloak side but then hide this registration button on the keycloak theme... then use the portal to make a valid request to this registration URL? Not sure about the parameters indeed. We'd have to find out if we can enable registrations without showing it in the login form. If there is no option, I can remove the if-statement from the login template. I'm getting used to the KC templates now :) In case you *do* decide to stick to registration via the flask app: * Is there a check to see if the username and e-mail are already registered? How is this handled? * Right now it only asks for a password once and without any criterea, it is good practice to ask for a password of some decent length and ask for a double entry to make sure people did not make a mistake.. Finally, it would be handy to use the HMTL that KC uses for the registration so people can just copy pasta their KC template CSS in this app! (all the above is the disadvantage of not using the built-in KC registration flow, and we might run in to more things down the line.) The 'you've been invited by x' is a really nice touch of this form though and would be sad to lose.
decentral1se changed title from could this use keycloak's own registration form? to Could this use keycloak's own registration form? 2023-04-17 09:22:33 +00:00
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: autonomic-cooperative/keycloak-collective-portal#8
No description provided.