Not getting user session in authenticator

authenticationFlowContext.getSession().sessions().getUserSessionsStream(context.getRealm(), authenticationFlowContext.getUser()).collect(Collectors.toList()); returns empty list…but using authenticationFlowContext.getSession().sessions().getKeycloakSession().sessions().getUserSessionsStream(authenticationFlowContext.getRealm(), context.getClient()).collect(Collectors.toList()) returns the sessions for the client