Hello there! I have a question regarding login actions
Is it possible to bypass that modal and instantly get to the change password form?
If there is any hint, I’ll appreciate this, thanks in advance for any help!
Hello there! I have a question regarding login actions
Is it possible to bypass that modal and instantly get to the change password form?
If there is any hint, I’ll appreciate this, thanks in advance for any help!
I managed to bypass the modal by overriding the default behavior of ExecuteActionsActionTokenHandler
You need to create a Keycloak extension, extend the org.keycloak.authentication.actiontoken.execactions.ExecuteActionsActionTokenHandler
class and comment out lines 81-90.
@claudiunicolaa Sorry for resurrecting a year old question, but could you be more specific on what to comment out? The file has moved and changed, so 81-90 doesn’t make sense. TIA
hey @gwin003
This is the code I commented out:
// Do not show "Perform the following action(s)" page.
// UriBuilder builder = Urls.actionTokenBuilder(uriInfo.getBaseUri(), token.serialize(session, realm, uriInfo),
// authSession.getClient().getClientId(), authSession.getTabId());
// String confirmUri = builder.build(realm.getName()).toString();
// return session.getProvider(LoginFormsProvider.class)
// .setAuthenticationSession(authSession)
// .setSuccess(Messages.CONFIRM_EXECUTION_OF_ACTIONS)
// .setAttribute(Constants.TEMPLATE_ATTR_ACTION_URI, confirmUri)
// .setAttribute(Constants.TEMPLATE_ATTR_REQUIRED_ACTIONS, token.getRequiredActions())
// .createInfoPage();
Thank you so much for that @claudiunicolaa .
How do I go about telling Keycloak to use the new extension instead of the default ExecuteActionsActionTokenHandler
? Do I need to also extend the DefaultActionToken
like it does here? Server Developer Guide
Edit: Please check out my question here for the solution → Custom SPI - Link for user to set their initial password
Hi @gwin003 do you know the way to tell keycloak use your custon execution token ?