handle

suspend fun handle(uri: Uri?): Boolean

Handles hosted auth, OAuth/SSO, and native magic-link deep link callbacks.

Call this method from your Activity when receiving a deep link callback from Clerk authentication flows.

For hosted auth callbacks this method suspends until callback validation and session redemption have finished. It returns before the redeemed session is activated, so Clerk.session may not yet reflect the new session when this method returns true.

Return

true if the URI was handled, false otherwise.

Example usage:

// In your Activity's onCreate or onNewIntent
lifecycleScope.launch {
clerk.auth.handle(intent.data)
}

Parameters

uri

The deep link URI received from the callback.