signInWithOtp
suspend fun signInWithOtp(block: SignInWithOtpBuilder.() -> Unit): ClerkResult<SignIn, ClerkErrorResponse>
Signs in with OTP - automatically sends the verification code.
This is a one-shot method that creates the sign-in and immediately prepares the first factor verification, sending the code to the specified channel.
Return
A ClerkResult containing the SignIn object on success, or a ClerkErrorResponse on failure.
Example usage:
val signIn = clerk.auth.signInWithOtp { email = "user@email.com" }
signIn.verifyCode("123456")Content copied to clipboard
Parameters
block
Builder block to configure the email or phone.