Register user with invitation
This Keycloak plugin adds a form action and a required action to register user with invitation.
- Validate invitation from external url
- Show invitation details in register form
- Call external url when registration successfull (WebhookRegistrationSuccess required action)
The version 11.0 of this plugin is compatible with Keycloak 11.0.3
and higher.
The plugin installation is simple and can be done without a Keycloak server restart.
- Download the latest release from the releases page
- Copy the JAR file into the
standalone/deployments
directory in your Keycloak server's root - Restart Keycloak (optional, hot deployment should work)
You can also clone the Github Repository and install the plugin locally with the following command:
$ mvn clean install wildfly:deploy
Form action 'RegistrationInvitation' and 'WebhookRegistrationSuccess' required action are deploy in keycloak. Got to {keycloak url}/auth/admin/master/console/#/server-info/providers.
Once the installation is complete, the Webhook Registration Success
required action appears in "
authentication/required-actions" on your realm. Register and enable Webhook Registration Success
.
Create your own 'registration flow' in /authentication/flows/registration on your realm.
- Copy registration to 'Registration With Invitation'
- Add Invitation Validation execution to 'Registration With Invitation' Registration Form
- Add config to 'Invitation Validation'
- Save config with alias 'invitation', the alias must be 'invitation'
You can override individual templates in your own theme. To create a custom register form for the mytheme theme copy register.ftl (in redfroggy theme) to themes/mytheme/login/.
- clone this repo git@github.com:RedFroggy/keycloak-registration-invitation.gi
git clone git@github.com:RedFroggy/keycloak-registration-invitation.git
- package jar
mvn package
Example to build with docker
cd keycloak-registration-invitation
docker run --rm -v "$(pwd)":/opt/maven -w /opt/maven maven:3.8.2-jdk-8 mvn -f /opt/maven/pom.xml clean package
- run docker-compose
docker-compose up -d --build --force-recreate
test registration