r/KeyCloak • u/FootballRemarkable53 • Oct 09 '26
OTP Method selection?
I want to enable the ability for users to choose whether they use an App (such as google authentication) or receive a code in their email for their 2FA. Currently, I have the native OTP in keycloak and an email OTP from an open source provider set up. The issue I come across is that there is no option to choose your method. Ideally, there would be a menu to let the user choose between the two but if thats not possible, I just want the ability to change between the two. This will be expanded to include receiving an SMS code as well. Is there anyway to do this cleanly?

3
u/Jon1155 Oct 10 '26
Keycloak doesn't easily allow a nice selection list to appear as the default, and most other platforms out there don't either. But it does give the user's last used MFA option alongside the 'try another way' button which does show a list.
Sometime we added was a custom authenticator which will reorder the users credentials based on our browser flow's MFA order. This means we can make Email OTP the last resort and have passkeys and mobile TOTP come first, so if the user has set them up then they'll be first prompted. The 'try another way' option is always available regardless.
1
u/CarinosPiratos Oct 11 '26 edited Oct 11 '26
Put OTP and the email OTP on the same height. Both as alternative. That should do the trick.
You will something like:“Try another method“