@Override
    protected Event doExecuteInternal(final RequestContext requestContext) {
        val principal = resolvePrincipal(WebUtils.getAuthentication(requestContext).getPrincipal(), requestContext);
        val uid = principal.getId();

        val accounts = repository.get(uid);
        if (accounts == null || accounts.isEmpty()) {
            return routeToRegistration(requestContext, principal);
        }
        if (accounts.size() > 1) {
            MultifactorAuthenticationWebflowUtils.putOneTimeTokenAccounts(requestContext, accounts);
            return eventFactory.event(this, CasWebflowConstants.TRANSITION_ID_CONFIRM);
        }
        MultifactorAuthenticationWebflowUtils.putOneTimeTokenAccount(requestContext, accounts.iterator().next());
        return success();
    }
This is {@link OneTimeTokenAccountCheckRegistrationAction}.

@author Misagh Moayyed
@since 5.0.0
support/cas-server-support-otp-mfa-core/src/main/java/org/apereo/cas/otp/web/flow/OneTimeTokenAccountCheckRegistrationAction.java