sendCode
suspend fun SignIn.sendCode(block: SendCodeBuilder.() -> Unit): ClerkResult<SignIn, ClerkErrorResponse>
Sends a verification code to the specified email or phone.
The code is sent to the first factor whose identifier matches SendCodeBuilder.email or SendCodeBuilder.phone. When the sign-in only exposes a masked identifier for its single matching factor (for example after identifying by username), that factor is used as long as the mask's visible characters agree with the requested identifier.
Return
A ClerkResult containing the updated SignIn object on success, or a ClerkErrorResponse on failure. Fails without contacting Clerk when no first factor matches.
Example usage:
signIn.sendCode { email = "user@email.com" }
// or
signIn.sendCode { phone = "+1234567890" }Content copied to clipboard
Parameters
block
Builder block to configure where to send the code.