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

# Cookie-based authentication

> Configure the React Native SDK to use cookie-based authentication with a custom API base URL.

For what cookie-based authentication is, how it works, and full dashboard setup steps, see [Cookie-based authentication](/overview/authentication/cookie-authentication).

## SDK configuration

Once your [cookie domain](/overview/authentication/cookie-authentication#setup) is configured and DNS is validated, pass `apiBaseUrl` when creating the client to point to your custom hostname:

```typescript theme={"system"}
import { createClient } from '@dynamic-labs/client';

export const dynamicClient = createClient({
  environmentId: 'YOUR_ENVIRONMENT_ID',
  apiBaseUrl: 'https://auth.example.io/api/v0',
  appName: 'My App',
});
```

Replace `auth.example.io` with the custom hostname you configured in the dashboard.
