linkIdentity
abstract suspend fun linkIdentity(provider: OAuthProvider, redirectUrl: String? = defaultRedirectUrl(), config: ExternalAuthConfigDefaults.() -> Unit = {}): String?(source)
Links an OAuth Identity to an existing user.
This methods works similar to signing in with OAuth providers. Refer to the documentation to learn how to handle OAuth and OTP links.
Return
The OAuth url to open in the browser if ExternalAuthConfigDefaults.automaticallyOpenUrl is false, otherwise null.
Parameters
provider
The OAuth provider
redirectUrl
The redirect url to use. If you don't specify this, the platform specific will be used, like deeplinks on android.
config
Extra configuration
Throws
or one of its subclasses if receiving an error response. If the error response contains a error code, an AuthRestException will be thrown which can be used to easier identify the problem.
HttpRequestTimeoutException
if the request timed out
on network related issues