Repository navigation
Replies: 1 comment
|
I plan to achieve this by chaining Required Actions and triggering them via Application Initiated Action (AIA). I tested a flow where users can manually verify their email, update it if needed, and then proceed to the Email OTP Required Action. Once the OTP is verified, the mfa_enabled attribute will be set, and the user's email will be updated. However, I still need to determine how to call AIA from a mobile app without requiring the user to authenticate again. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I have implemented an Email OTP Authenticator and integrated it into the Browser Authentication Flow with a Conditional User Attribute check. This ensures that Email OTP is only prompted if the
mfa_enableduser attribute is set.For new users, I have a custom Event Listener SPI that automatically sets
mfa_enabled=trueduring the REGISTER event, requiring all new users to log in with Email OTP. This part works seamlessly.Issue: Enabling Email OTP MFA for Existing Users
I need to provide a seamless way for existing users to enable Email OTP MFA from my client application. The flow is as follows:
mfa_enabledis not present in the JWT, the client app prompts the user to enable Email OTP MFA.mfa_enableduser attribute to be set totrue, enforcing Email OTP for subsequent logins.Initial Approach & Challenge
I initially considered implementing two new Required Actions:
I also planned to support Application Initiated Actions for these steps. However, since these are two separate Required Actions, the client app would have to manually orchestrate the flow—first triggering the email update, then triggering OTP verification. This is not ideal.
I would prefer Keycloak to orchestrate this entire process instead of relying on the client app.
Additional Requirement: Enforcing Email OTP for Sensitive Actions
Once Email OTP MFA is enabled, I also want to enforce OTP verification for sensitive account actions, including:
However, I do not want to force a full re-login before these actions—only an Email OTP prompt for additional security.
Questions:
I appreciate any suggestions or best practices from the community.
Thanks!
All reactions