Clerk

object Clerk

Main entrypoint class for the Clerk SDK.

Provides access to authentication state, user information, and core functionality for managing user sessions and sign-in flows.

Properties

Link copied to clipboard
Link copied to clipboard
lateinit var client: Client

The Client object representing the current device and its authentication state.

Link copied to clipboard

Enable for additional debugging signals and logging.

Link copied to clipboard

Indicates whether first name is enabled in user settings for this application.

Link copied to clipboard
val isInitialized: StateFlow<Boolean>

Reactive state indicating whether the Clerk SDK has completed initialization.

Link copied to clipboard

Indicates whether a user is currently signed in.

Link copied to clipboard

Indicates whether last name is enabled in user settings for this application.

Link copied to clipboard

The image URL for the application logo used in authentication UI components.

Link copied to clipboard

Indicates whether authenticator app MFA is enabled for this application.

Link copied to clipboard

Indicates whether multi-factor authentication (MFA) is enabled for this application.

Link copied to clipboard

Indicates whether passkey authentication is enabled for this application.

Link copied to clipboard

Indicates whether password authentication is enabled for this application.

Link copied to clipboard

The currently active user session.

Link copied to clipboard

The current sign-in attempt, if one is in progress.

Link copied to clipboard

The current sign-up attempt, if one is in progress.

Link copied to clipboard

Map of available social authentication providers configured for this application.

Link copied to clipboard
val user: User?

The currently authenticated user.

Link copied to clipboard

Indicates whether username authentication is enabled for this application.

Functions

Link copied to clipboard
fun initialize(context: Context, publishableKey: String)
fun initialize(context: Context, publishableKey: String, options: ClerkConfigurationOptions? = null)

Initializes the Clerk SDK with the provided configuration.

Link copied to clipboard

Signs out the currently authenticated user.