protected Collection<ConfigurableDelegatedClient> buildFacebookIdentityProviders(final CasConfigurationProperties casProperties) {
        val pac4jProperties = casProperties.getAuthn().getPac4j();
        val fb = pac4jProperties.getFacebook();
        if (fb.isEnabled() && StringUtils.isNotBlank(fb.getId()) && StringUtils.isNotBlank(fb.getSecret())) {
            val client = new FacebookClient(fb.getId(), fb.getSecret());
            FunctionUtils.doIfNotBlank(fb.getScope(), __ -> client.setScope(fb.getScope()));
            FunctionUtils.doIfNotBlank(fb.getFields(), __ -> client.setFields(fb.getFields()));
            LOGGER.debug("Created client [{}] with identifier [{}]", client.getName(), client.getKey());
            return List.of(new ConfigurableDelegatedClient(client, fb));
        }
        return List.of();
    }
This is {@link DelegatedClientOidcBuilder}.

@author Misagh Moayyed
@since 7.1.0
support/cas-server-support-pac4j-oidc/src/main/java/org/apereo/cas/pac4j/web/DelegatedClientOidcBuilder.java