Skip to main content
Docs

Migrate from Clerk Android SDK v0 to v1

build.gradle.kts
dependencies {
    // For prebuilt UI components (includes API)
    implementation("com.clerk:clerk-android-ui:1.0.0")

    // Or for API only (no UI)
    implementation("com.clerk:clerk-android-api:1.0.0")
}

Renamed properties

The signIn and signUp properties on Auth have been renamed to avoid confusion with the methods of the same name:

// v0
val currentSignIn = Clerk.auth.signIn
val currentSignUp = Clerk.auth.signUp
// v1
val currentSignIn = Clerk.auth.currentSignIn
val currentSignUp = Clerk.auth.currentSignUp

MFA code methods

The sendMfaCode builder function has been replaced with specific methods:

// v0
signIn = signIn.sendMfaCode { phone = phoneNumberId }
signIn = signIn.sendMfaCode { email = emailAddressId }
// v1
signIn = signIn.sendMfaPhoneCode(phoneNumberId)
signIn = signIn.sendMfaEmailCode(emailAddressId)

Sign in with ID token

signInWithIdToken now uses a builder pattern:

// v0
val result = Clerk.auth.signInWithIdToken(idToken, IdTokenProvider.GOOGLE)
// v1
val result = Clerk.auth.signInWithIdToken {
    token = idToken
    provider = IdTokenProvider.GOOGLE
}

Migration checklist

  • Update your Gradle dependency to version 1.0.0.
  • Update auth flows to use Clerk.auth.
  • Move to using the new builder pattern for auth flows.

Feedback

What did you think of this content?

Last updated on

GitHubEdit on GitHub