The SSO Discovery method surfaces SSO connections for the end user. It will return all active SSO connections for an end user or, if no active connections are found, it will return all SSO connections that the end user could JIT provision into based on the provided email address.
Discover SSO Connections
Response fields
status_code int
request_id string
connections array[Object]
import { useStytchB2BClient } from '@stytch/react/b2b';
export const SSOConnectionsDiscovery = () => {
const stytch = useStytchB2BClient();
const discoverSSOConnections = () => {
stytch.sso.discoverConnections('sandbox@stytch.com');
};
return <button onClick={discoverSSOConnections}>Discover SSO Connections</button>;
};
RESPONSE
200
{
"request_id": "request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141",
"status_code": 200,
"connections": [{...}, {...}],
}