API Stability |
Preview
|
The updateSocialLoginSettings() GraphQL mutation is used to update the social login options for an organization. This field is a preview. It requires that the feature be enabled for the organization.
For more information on user authorization, see the Manage users & permissions documentation page.
Syntax
Below is the syntax for the updateSocialLoginSettings() mutation field:
updateSocialLoginSettings(
input: [SocialLoginSettingsInput!]!
): Organization!
Below is an example of how this mutation field might be used:
mutation {
updateSocialLoginSettings(input:
{ socialProviderProfile: Google,
filter: AllowAll,
allowList: []
} )
{ id }
}
curl -v -X POST $YOUR_LOGSCALE_URL/graphql \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d @- << EOF
{"query" : "mutation {
updateSocialLoginSettings(input:
{ socialProviderProfile: Google,
filter: AllowAll,
allowList: []
} )
{ id }
}"
}
EOF
curl -v -X POST $YOUR_LOGSCALE_URL/graphql \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d @- << EOF
{"query" : "mutation {
updateSocialLoginSettings(input:
{ socialProviderProfile: Google,
filter: AllowAll,
allowList: []
} )
{ id }
}"
}
EOF
curl -v -X POST $YOUR_LOGSCALE_URL/graphql ^
-H "Authorization: Bearer $TOKEN" ^
-H "Content-Type: application/json" ^
-d @'{"query" : "mutation { ^
updateSocialLoginSettings(input: ^
{ socialProviderProfile: Google, ^
filter: AllowAll, ^
allowList: [] ^
} ) ^
{ id } ^
}" ^
} '
curl.exe -X POST
-H "Authorization: Bearer $TOKEN"
-H "Content-Type: application/json"
-d '{"query" : "mutation {
updateSocialLoginSettings(input:
{ socialProviderProfile: Google,
filter: AllowAll,
allowList: []
} )
{ id }
}"
}'
"$YOUR_LOGSCALE_URL/graphql"
#!/usr/bin/perl
use HTTP::Request;
use LWP;
my $INGEST_TOKEN = "TOKEN";
my $uri = '$YOUR_LOGSCALE_URL/graphql';
my $json = '{"query" : "mutation {
updateSocialLoginSettings(input:
{ socialProviderProfile: Google,
filter: AllowAll,
allowList: []
} )
{ id }
}"
}';
my $req = HTTP::Request->new("POST", $uri );
$req->header("Authorization" => "Bearer $TOKEN");
$req->header("Content-Type" => "application/json");
$req->content( $json );
my $lwp = LWP::UserAgent->new;
my $result = $lwp->request( $req );
print $result->{"_content"},"\n";
#! /usr/local/bin/python3
import requests
url = '$YOUR_LOGSCALE_URL/graphql'
mydata = r'''{"query" : "mutation {
updateSocialLoginSettings(input:
{ socialProviderProfile: Google,
filter: AllowAll,
allowList: []
} )
{ id }
}"
}'''
resp = requests.post(url,
data = mydata,
headers = {
"Authorization" : "Bearer $TOKEN",
"Content-Type" : "application/json"
}
)
print(resp.text)
const https = require('https');
const data = JSON.stringify(
{"query" : "mutation {
updateSocialLoginSettings(input:
{ socialProviderProfile: Google,
filter: AllowAll,
allowList: []
} )
{ id }
}"
}
);
const options = {
hostname: '$YOUR_LOGSCALE_URL/graphql',
path: '/graphql',
port: 443,
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Content-Length': data.length,
Authorization: 'BEARER ' + process.env.TOKEN,
'User-Agent': 'Node',
},
};
const req = https.request(options, (res) => {
let data = '';
console.log(`statusCode: ${res.statusCode}`);
res.on('data', (d) => {
data += d;
});
res.on('end', () => {
console.log(JSON.parse(data).data);
});
});
req.on('error', (error) => {
console.error(error);
});
req.write(data);
req.end();
Given Datatypes
SocialLoginSettingsInput has a few parameters that may be given. Below is a list of them along with a description of each:
Table: SocialLoginSettingsInput
Parameter | Type | Required | Default | Stability | Description |
---|---|---|---|---|---|
Some arguments may be required, as indicated in the Required column. For some fields, this column indicates that a result will always be returned for this column. | |||||
Table last updated: Sep 19, 2024 | |||||
allowList | [string] | yes | The list of social logins allowed. | ||
filter | SocialLoginField | yes | Whether to allow some or all, or deny all. See SocialLoginField . | ||
socialProviderProfile | SocialProviderProfile | yes | This name of the social provider. See SocialProviderProfile . |
Returned Datatypes
The returned datatype Organization has several parameters. Below is a list of them along with a description of each:
Table: Organization
Parameter | Type | Required | Default | Stability | Description |
---|---|---|---|---|---|
Some arguments may be required, as indicated in the Required column. For some fields, this column indicates that a result will always be returned for this column. | |||||
Table last updated: Sep 27, 2024 | |||||
cid | string | Short-Term | The CID corresponding to the organization. | ||
configs | OrganizationConfigs | yes | Short-Term | Organization configurations and settings. See OrganizationDetails . | |
createdAt | long | Short-Term | Date organization was created. | ||
defaultCachePolicy | CachePolicy | Preview | The default cache policy of the organization. See CachePolicy . This is a preview and subject to change. | ||
description | string | Short-Term | The description for the Organization. Can be null. | ||
details | OrganizationDetails | yes | Short-Term | Any additional details related to the organization. See OrganizationDetails . | |
externalGroupSynchronization | boolean | yes | Short-Term | Whether there is group synchronization. | |
externalPermissions | boolean | yes | Short-Term | Whether permissions are managed externally. | |
id | string | yes | Short-Term | The unique id for the Organization. | |
ingestUrl | string | Short-Term | The ingest URL for the organization. | ||
isActionAllowed | multiple | yes | Short-Term | Check if user has a permission in organization. The datatype consists of (action: OrganizationAction): boolean . For OrganizationAction , give the action to check if a user is allowed to perform on the organization. See OrganizationAction . | |
limits | [Limit ] | yes | Short-Term | Limits assigned to the organization. See Limit . | |
limitsV2 | [LimitV2 ] | yes | Short-Term | Limits assigned to the organization. See LimitV2 . | |
name | string | yes | Short-Term | The name for the Organization. | |
publicUrl | string | Short-Term | The public URL for the organization. | ||
readonlyDashboardIPFilter | string | Short-Term | IP filter for readonly dashboard links. | ||
searchDomains | [SearchDomain ] | yes | Short-Term | Search domains within the organization. See SearchDomain . | |
stats | OrganizationStats | yes | Short-Term | Statistics of the organization. See OrganizationStats . | |
trialStartedAt | long | Short-Term | Date organization's trial started. |