authenticateWithPreparedRedirect

suspend fun SignIn.authenticateWithPreparedRedirect(transferable: Boolean = true, legalAccepted: Boolean? = null): ClerkResult<OAuthResult, ClerkErrorResponse>

Continues a prepared redirect verification.

Use this after a sign-in has prepared a first factor that returned an externalVerificationRedirectUrl, such as Enterprise SSO. Most callers should use authenticateWithOAuth or authenticateWithEnterpriseSso, which prepare the factor and then call this.

The redirect must have been prepared by this SDK in the current process (for example with prepareFirstFactor); otherwise its callback cannot be verified and this returns a failure without launching the browser. Prepare the first factor again in that case.

Return

A ClerkResult containing the redirect authentication result on success, or a ClerkErrorResponse on failure.

Parameters

transferable

Whether this authentication flow allows transferring to a sign-up if the user doesn't have an account. Defaults to true.

legalAccepted

Whether the user has accepted the instance's legal terms. A sign-in does not take it, so it is sent only if the flow transfers to a sign-up. Defaults to null, which sends nothing.