Display "Try another way" after login, not the first otp

I have recently integrate Otp Email (plugin overwrited) and Otp Sms (also plugin overwrited) on my keycloak cluster.
I have the link “Try another way” who appear at bottom of my form when the user be on first otp form.

But for my user, i need the user choose directly the otp who they want use.
I want to display just after login the “try another way” form and not the first otp form.

I have checked in .tpl if i find a solution… but nothing…

I don’t know if i need to use a custom authentication provider for redirect directly to “try another way” form.

Maybe @dasniko , you can help me :smile: (thanks also to your tutorial on otp sms :call_me_hand: )
Thanks lot

AFAIK this “try another way” logic is deep in the Keycloak core classes, which are not customizable.
Perhaps there’s a way to write a custom Authenticator which has some custom logic to do something like a choice of options… might work, but I didn’t do it yet.

Hi @dasniko
Yes i found the source code where this action is executed. I try to do an custom plugin and i share it if i find the solution

1 Like

please can u share the filename or action name for ‘try another way’ source code ?

Hello @enggomarpu, you can start looking around this part of the keycloak source code : Code search results · GitHub