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

The current session only if its status is ACTIVE.

Link copied to clipboard

The current user only if the session status is ACTIVE.

Link copied to clipboard
Link copied to clipboard
val auth: Auth

The Auth namespace providing all authentication entry points.

Link copied to clipboard
lateinit var client: Client

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

Link copied to clipboard

Clerk theme configuration for customizing the appearance of authentication UI components.

Link copied to clipboard

Enable for additional debugging signals and logging.

Link copied to clipboard
Link copied to clipboard

A list of enabled first factor attributes, sorted by priority.

Link copied to clipboard

Reactive state for initialization errors.

Link copied to clipboard

Indicates whether Clerk branding is enabled for the application.

Link copied to clipboard

Indicates whether the 'First Name' field is enabled for user profiles.

Link copied to clipboard

Indicates whether Google One Tap sign-in is enabled for the 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 the last name field is enabled for user profiles.

Link copied to clipboard

Indicates whether a user is currently signed in.

Link copied to clipboard
Link copied to clipboard
val locale: StateFlow<String?>

The active locale for the current session.

Link copied to clipboard
Link copied to clipboard

Indicates whether MFA (Multi-Factor Authentication) via backup codes is enabled.

Link copied to clipboard
Link copied to clipboard

Indicates whether MFA (Multi-Factor Authentication) via phone code is enabled.

Link copied to clipboard

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

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The URL of the Privacy Policy page for the application.

Link copied to clipboard

Optional proxy URL for network requests.

Link copied to clipboard

The publishable key from Clerk Dashboard used for API authentication.

Link copied to clipboard

The current user session, regardless of status.

Link copied to clipboard
val sessionFlow: StateFlow<Session?>

Reactive state for the current user session.

Link copied to clipboard

Map of available social authentication providers configured for this application.

Link copied to clipboard

Whether to enable telemetry for the SDK.

Link copied to clipboard

The URL of the Terms of Service page for the application.

Link copied to clipboard
val user: User?

The current user, regardless of session status.

Link copied to clipboard
val userFlow: StateFlow<User?>

Reactive state for the currently authenticated user.

Link copied to clipboard

The current version of the Clerk Android SDK.

Functions

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

Initializes the Clerk SDK with the provided configuration.

Link copied to clipboard

Manually triggers a reinitialization attempt after a failed initialization.