signUpWithOAuth
suspend fun signUpWithOAuth(provider: OAuthProvider, redirectUrl: String = RedirectConfiguration.DEFAULT_REDIRECT_URL, unsafeMetadata: Map<String, Any>? = null): ClerkResult<OAuthResult, ClerkErrorResponse>
Signs up with OAuth provider.
Return
A ClerkResult containing the OAuthResult on success, or a ClerkErrorResponse on failure. The result holds a sign-in instead of a sign-up when the account already existed.
Example usage:
val result = clerk.auth.signUpWithOAuth(OAuthProvider.GOOGLE)Content copied to clipboard
Parameters
provider
The OAuth provider to use for sign-up.
redirectUrl
The native callback URL. Defaults to the callback registered by the SDK. A custom value needs an intent filter that routes it to com.clerk.api.sso.SSOReceiverActivity in the application manifest. handle only completes OAuth callbacks with a clerk scheme.
unsafeMetadata
Custom metadata attached to the created user. Clerk does not validate it, so it must not hold sensitive information.