Auth
Main Auth class providing all authentication entry points.
Access via Clerk.auth.
This class provides a centralized, DSL-style API for all authentication operations including:
Sign in with various methods (password, OTP, OAuth, passkey, etc.)
Sign up with various methods
Session management (sign out, set active session, get tokens)
Deep link handling for OAuth/SSO callbacks
Example usage:
// Sign in with email (requires separate sendCode call)
val signIn = clerk.auth.signIn { email = "user@email.com" }
// Sign in with password
val signIn = clerk.auth.signInWithPassword {
identifier = "user@email.com"
password = "password"
}
// Sign in with OTP (automatically sends code)
val signIn = clerk.auth.signInWithOtp { email = "user@email.com" }
// Sign out
clerk.auth.signOut()Properties
Functions
Gets a token for the current session.
Revokes a session.
Sets the active session.
Starts sign-in with an identifier (email, phone, or username).
Starts sign-in with an identifier (email, phone, or username).
Signs in via account portal.
Signs in via account portal.
Signs in with Enterprise SSO.
Signs in with Enterprise SSO.
Signs in with an ID token from an identity provider.
Signs in with an ID token from an identity provider.
Signs in with OAuth provider.
Signs in with OAuth provider.
Signs in with OTP - automatically sends the verification code.
Signs in with OTP - automatically sends the verification code.
Signs in with passkey.
Signs in with passkey.
Signs in with password authentication.
Signs in with password authentication.
Signs in with a ticket.
Signs in with a ticket.
Signs out the current session or a specific session.
Creates a new sign-up with the provided details.
Creates a new sign-up with the provided details.
Signs up via account portal.
Signs up via account portal.
Signs up with Enterprise SSO.
Signs up with Enterprise SSO.
Signs up with an ID token from an identity provider.
Signs up with an ID token from an identity provider.
Signs up with OAuth provider.
Signs up with OAuth provider.
Signs up with a ticket.
Signs up with a ticket.