Skip to main content
For what cookie-based authentication is, how it works, and full dashboard setup steps, see Cookie-based authentication.

SDK configuration

Before this: create and initialize a Dynamic client (see Creating a Dynamic Client, Initializing the Dynamic Client). Once your cookie domain is configured and DNS is validated, pass apiBaseUrl when creating the client to point to your custom hostname:
import { createDynamicClient } from '@dynamic-labs-sdk/client';

const dynamicClient = createDynamicClient({
  environmentId: 'YOUR_ENVIRONMENT_ID',
  apiBaseUrl: 'https://auth.example.io/api/v0',
});
Replace auth.example.io with the custom hostname you configured in the dashboard.