p2-inc / keycloak-orgs

Single realm, multi-tenancy for SaaS apps
https://phasetwo.io
Other
417 stars 72 forks source link

No activation link? #155

Closed uahic closed 10 months ago

uahic commented 10 months ago

Hi there,

first of all thank you for open sourcing this amazing extension! With all the examples, alot of try/error I'm getting closer and closer to understanding all mechanism of keycloak and the orgs extension. Unfortunately I have to stick to 22.0.5 for now and I think I've read that you only support the newest but this question might be not a bug so Illl try :)

When triggering an invitation to an organisation (e.g. in the original keycloak admin UI with your theme activated), I am able to send an activation email to mailhog. However, there is no activation link contained by default, only an empty \ HTML tag. Yes, I can set manually one by filling out the redirect link but isn't there an activation endpoint somewhere already or is the idea that the user has to implement this endpoint?

Thank you very much

P.S. the email function for organisation-invitations did not work with the 22.0.5 container (build from your github), a dependency for in the pom.xml for jakarta was missing (and building the container again of course). Then it works fine.

    <dependency>
      <groupId>com.sun.mail</groupId>
      <artifactId>jakarta.mail</artifactId>
      <version>2.0.1</version>
    </dependency>
xgp commented 10 months ago

The idea is that you set the redirect_uri to a protected URI in your application where you want the user to go after they have authenticated and accepted/declined the invitation. There is no "activation link" per se. Instead, activation occurs as part of the authentication flow.

Once the user has authenticated, the InvitationRequiredAction runs by default, using the evaluateTriggers method, and adds itself to the user's required actions if they have an active invitation. Then, the required action runs, and the user is sent to a screen where they can accept/decline their outstanding invitations.

22.0.5

Per your observation, we don't support any previous versions, so I'm sorry I can't help you there.