Custom Action Token

I created a Custom required action and I am trying to call it using a custom action token.

using type : execute-actions
And rqac [ ] with my custom application Id.

The application is initiated successfully. But system automatically sets the user’s verified email as true. Also my custom action token handler is never initiated.

In Better words

I have created a custom required action for verification of phone number. And I want to trigger the action using an action token. Now when i create an action token and trigger it using the action token link, it automatically sets emailVerified as true.

I created the action token with typ as “execute-actions” and added custom action id inside rqac[].

Please help me out!!
Thanks in advance.

Without seeing some code it’s hard to know where to begin.
Did you take your example from ExecuteActionsActionTokenHandler?
You can also see in that handler that at handleToken the email is set verified at some point.
Maybe create your own handler based on that one.
Also take note that that example calls the next required action in the chain → redirectToRequiredActions, so if email verification is required and not done yet it’s possible this is the culprit.
These are just guesses based on the code I see in the Keycloak repo itself, so don’t bet your paycheck on it :stuck_out_tongue:

1 Like

Yes, I created a custom action token and created a custom action token handler like ExecuteActionsActionTokenHandler without email verification to false. And it worked.

Thanks