Question: I have a set object ... if **num** is found in **numberSet**, I am deleting that value from object set using .delete function. *Additionally*, I would like to delete anything before it (in this case '6' or first entry or any number lower than num) ... Is that possible using delete?

```
const numberSet = new Set(['6', '7', '8']);
const num = '7'

if (numberSet.has(num)) {
 numberSet.delete(num)
} 

```

Answer: 
I could remove the "info.ftl" page display, customizing the "ExecuteActionsActionTokenHandler", as explained here :

[action-token-spi](https://github.com/keycloak/keycloak-documentation/blob/main/server_development/topics/action-token-spi.adoc)

You have to create a file :

> 
> src/main/resources/META-INF/services/org.keycloak.authentication.actiontoken.ActionTokenHandlerFactory
> 
> 
> 

containing the name of the class you want to use instead :

> 
> com.example.ExecuteActionTokenHandlerFactory
> 
> 
> 

Then you create that class com.example.ExecuteActionTokenHandlerFactory with the following code :

```java
public class ExecuteActionTokenHandlerFactory extends ExecuteActionsActionTokenHandler {

    @Override
    public Response handleToken(ExecuteActionsActionToken token, ActionTokenContext<ExecuteActionsActionToken> tokenContext) {
        AuthenticationSessionModel authSession = tokenContext.getAuthenticationSession();
        String redirectUri = RedirectUtils.verifyRedirectUri(tokenContext.getUriInfo(), token.getRedirectUri(),
                tokenContext.getRealm(), authSession.getClient());

        if (redirectUri != null) {
            authSession.setAuthNote(AuthenticationManager.SET_REDIRECT_URI_AFTER_REQUIRED_ACTIONS, "true");

            authSession.setRedirectUri(redirectUri);
            authSession.setClientNote(OIDCLoginProtocol.REDIRECT_URI_PARAM, redirectUri);
        }

        token.getRequiredActions().stream().forEach(authSession::addRequiredAction);

        UserModel user = tokenContext.getAuthenticationSession().getAuthenticatedUser();
        // verify user email as we know it is valid as this entry point would never have gotten here.
        user.setEmailVerified(true);

        String nextAction = AuthenticationManager.nextRequiredAction(tokenContext.getSession(), authSession, tokenContext.getClientConnection(), tokenContext.getRequest(), tokenContext.getUriInfo(), tokenContext.getEvent());
        return AuthenticationManager.redirectToRequiredActions(tokenContext.getSession(), tokenContext.getRealm(), authSession, tokenContext.getUriInfo(), nextAction);
    }

}

```

Actually it is the same implementation as the upper class, except we removed the following part :

```java
        if (tokenContext.isAuthenticationSessionFresh()) {
           ...
        }

```

which means that if the user did not have a session, which happens when the user is reseting his password, he is redirected to that "info.ftl" page.
As a workaround for problem A, I customize `info.ftl` template page. I add an ugly inline script to `click` on the link, redirecting automatically to the update password page.

```html
<#import "template.ftl" as layout>
(...)
            <#elseif actionUri?has_content>
              <p><a id="yolo" href="${actionUri}">${kcSanitize(msg("proceedWithAction"))?no_esc}</a></p>
              <script>document.getElementById('yolo').click()</script>
(...)
```

It'll do the job until I found a cleaner solution.

At the moment, B problem remains.