> ## Documentation Index
> Fetch the complete documentation index at: https://stytch.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Start SSO Flow

> Start a Single Sign-On authentication flow using the Stytch Vanilla JS SDK

`sso.start()` starts an SSO flow by redirecting the browser to Stytch's [SSO Start](/api-reference/b2b/api/sso/shared/start-sso-authenticate) endpoint. The method will also generate a PKCE `code_verifier` and store it in localstorage on the device.

### Parameters

<ParamField path="connection_id" type="string" required>
  Globally unique UUID that identifies a specific SSO `connection_id` for a Member.
</ParamField>

<ParamField path="login_redirect_url" type="string">
  The URL Stytch redirects to after the SSO flow is completed for a Member that already exists. This URL should be a route in your application which will run [`sso.authenticate`](./authenticate) and finish the login.

  The URL must be configured as a Login URL in the [Stytch Dashboard](https://stytch.com/dashboard/redirect-urls). If the field is not specified, the default Login URL will be used.
</ParamField>

<ParamField path="signup_redirect_url" type="string">
  The URL Stytch redirects to after the SSO flow is completed for a Member that does not yet exist. This URL should be a route in your application which will run sso.authenticate (see below) and finish the signup.

  The URL must be configured as a Signup URL in the [Stytch Dashboard](https://stytch.com/dashboard/redirect-urls). If the field is not specified, the default Signup URL will be used.
</ParamField>

<Panel>
  <RequestExample>
    ```javascript theme={null}
    import { StytchB2BClient } from '@stytch/vanilla-js/b2b';

    const stytch = new StytchB2BClient('public-token-test-b8c84de4-7d58-4ffc-9341-432b56596862');

    // Start SSO flow
    stytch.sso.start({
      connection_id: 'saml-connection-test-d89ff7a0-e86f-4b4d-b6a3-9a74d967528e',
      login_redirect_url: 'https://example.com/authenticate',
      signup_redirect_url: 'https://example.com/authenticate',
    });
    ```
  </RequestExample>
</Panel>
