private MultiTenantBuilder AddFacebookTenant(MultiTenantBuilder arg)
        {
            return(arg.WithPerTenantOptions <FacebookOptions>((options, tenantContext) => {
                var socialLogins = tenantContext.Items[Tenant.Constants.SOCIALLOGINS] as Dictionary <string, Dictionary <string, string> >;
                if (socialLogins == null || !socialLogins.TryGetValue("facebook", out Dictionary <string, string> settings))
                {
                    return;
                }

                options.AppId = settings["AppId"];
                options.AppSecret = settings["AppSecret"];
            }));
        }
        private MultiTenantBuilder AddGoogleTenant(MultiTenantBuilder arg)
        {
            return(arg.WithPerTenantOptions <GoogleOptions>((options, tenantContext) => {
                var socialLogins = tenantContext.Items[Tenant.Constants.SOCIALLOGINS] as Dictionary <string, Dictionary <string, string> >;
                if (socialLogins == null || !socialLogins.TryGetValue("google", out Dictionary <string, string> settings))
                {
                    return;
                }

                options.ClientId = settings["ClientId"];
                options.ClientSecret = settings["ClientSecret"];
            }));
        }
        private MultiTenantBuilder AddTwitterTenant(MultiTenantBuilder arg)
        {
            return(arg.WithPerTenantOptions <TwitterOptions>((options, tenantContext) => {
                var socialLogins = tenantContext.Items[Tenant.Constants.SOCIALLOGINS] as Dictionary <string, Dictionary <string, string> >;
                if (socialLogins == null || !socialLogins.TryGetValue("twitter", out Dictionary <string, string> settings))
                {
                    return;
                }

                options.ConsumerKey = settings["ConsumerKey"];
                options.ConsumerSecret = settings["ConsumerSecret"];
            }));
        }