'Bypass "Perform the following action(s)" in KeyCloak?
Using KeyCloak as the identity management backend, I'd like a newly registered user to receive a custom email with a verification code to a designated domain (not KeyCloak's default link).
Currently, KeyCloak will send an email linking to a "perform the following action" KeyCloak page; e.g.:
http://localhost:8080/auth/realms/test_webapp/login-actions/action-token?key=eyJhb...
Following this link, the KeyCloak-served page asks to 'proceed to email verification', using yet another link to:
http://localhost:8080/auth/realms/<myrealm>/login-actions/required-action?execution=VERIFY_EMAIL&client_id=account&tab_id=Vu4BAcuG2X1
This auth / verification dance seems cumbersome and exposes KeyCloak to users directly - I'd like the entire user authentication flow (from registration onwards) to be handled by my backend, not KeyCloak. Is there a way to send a custom email with some token to allow verifying the user?
A sample flow would be:
- User registers on mysite.com's
/registerpath and is redirected to a 'check your email page' - mysite.com's backend registers a new user via KeyCloak's ReST API, with "emailVerified=False".
- User receives a [custom] email to verify their email address, e.g. email content would be:
<a href="mysite.com/verify-email?code=<some_code">verify</a> - mysite.com's backend exchanges
<some_code>with KeyCloak's ReST API to verify this user's email and [if verification ok] KeyCloak is to change emailVerified to True.
Is this possible with KeyCloak?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
