handle

suspend fun handle(uri: Uri, sessionDurationMinutes: UInt): DeeplinkHandledStatus

Call this method to parse out and authenticate deeplinks that your application receives. The currently supported deeplink types are: Email Magic Links, Third-Party OAuth, and Password resets.

For Email Magic Links and Third-Party OAuth deeplinks, it will return a DeeplinkHandledStatus.Handled class containing either the authenticated response or error.

For Password Reset deeplinks, it will return a DeeplinkHandledStatus.ManualHandlingRequired class containing the relevant token, so that you can provide an appropriate UI to the user for resetting their password. The returned token is used for making the subsequent StytchClient.passwords.resetByEmail() call.

Any other link types passed to this method will return a DeeplinkHandledStatus.NotHandled class.

Return

DeeplinkHandledStatus

Parameters

uri

intent.data from deep link

sessionDurationMinutes

desired session duration in minutes


fun handle(uri: Uri, sessionDurationMinutes: UInt, callback: (response: DeeplinkHandledStatus) -> Unit)

Call this method to parse out and authenticate deeplinks that your application receives. The currently supported deeplink types are: Email Magic Links, Third-Party OAuth, and Password resets.

For Email Magic Links and Third-Party OAuth deeplinks, it will return a DeeplinkHandledStatus.Handled class containing either the authenticated response or error.

For Password Reset deeplinks, it will return a DeeplinkHandledStatus.ManualHandlingRequired class containing the relevant token, so that you can provide an appropriate UI to the user for resetting their password. The returned token is used for making the subsequent StytchClient.passwords.resetByEmail() call.

Any other link types passed to this method will return a DeeplinkHandledStatus.NotHandled class.

Parameters

uri

intent.data from deep link

sessionDurationMinutes

desired session duration in minutes

callback

A callback that receives a DeeplinkHandledStatus