authenticateWithRedirect

Initiates the sign-in process using an OAuth or Enterprise SSO redirect flow.

Return

A ClerkResult containing the result of the authentication flow. The OAuthResult could contain either a sign-in or sign-up result, depending on whether an account transfer took place (i.e. if the user didn't have an account and a sign up was created instead).

Parameters

params

The parameters for the redirect-based authentication.

transferable

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

See also

(https://clerk.com/docs/references/javascript/types/sso)

Example usage:

SignIn.authenticateWithRedirect(
AuthenticateWithRedirectParams.OAuth(provider = OAuthProvider.GOOGLE)
).onSuccess { result ->
// Handle the result
}.onFailure { error ->
// Handle the error
}