initialize

fun initialize(context: Context, publishableKey: String)

Initializes the Clerk SDK with the provided configuration.

This method must be called before using any other Clerk functionality. It configures the API client, initializes local storage, and begins the authentication state setup.

Parameters

context

The application context used for initialization and storage setup.

publishableKey

The publishable key from your Clerk Dashboard that connects your app to Clerk.

Throws

if the publishable key format is invalid.


fun initialize(context: Context, publishableKey: String, options: ClerkConfigurationOptions? = null)

Initializes the Clerk SDK with the provided configuration.

This method must be called before using any other Clerk functionality. It configures the API client, initializes local storage, and begins the authentication state setup.

Parameters

context

The application context used for initialization and storage setup.

publishableKey

The publishable key from your Clerk Dashboard that connects your app to Clerk.

options

Enable additional options for the Clerk SDK. See ClerkOptions for details.

Throws

if the publishable key format is invalid.