Require single sign-on
const url = 'http://localhost:3000/api/v1/sso';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"required":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url http://localhost:3000/api/v1/sso \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "required": true }'With required, addresses at the verified domain sign in only through the provider: password sign-in answers SSO_REQUIRED and no reset email goes out. The organization’s admins keep their password, so a provider that breaks never locks the organization out. Requiring it signs out everyone else at the domain.
Scope: admin.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
Hold everyone at the domain to the provider: no password sign-in or reset, but for the organization’s admins
Examplegenerated
{ "required": true}Responses
Section titled “Responses”Single sign-on
object
object
The domain is proved: its people sign in through the provider
Addresses at the domain sign in only through the provider, but for the organization’s admins
The project its people land in the first time, able to read; null for the organization’s oldest
What proves the domain: add this record at your DNS host
object
Register this with the provider as the app’s redirect URI
Example
{ "data": { "record": { "type": "TXT" } }}default
Section titled “default”An error
object
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "detail": "example" }}