prepareSessionTransfer

Prepares a URL that signs the current user in on the web and then lands on destination.

Prepare the transfer right before opening it. The URL works once and expires 60 seconds after it is created. Never log or store it.

Most apps should call openInBrowser or loadInWebView, which prepare the transfer and open it in one step. Use this method only to open the URL some other way. An app that opens the URL in a browser itself must set Intent.EXTRA_REFERRER to Uri.parse("android-app://" + packageName) on the intent. Otherwise the transfer fails and the browser lands on destination with __clerk_error_code=cross_site_request.

destination must be an absolute http or https URL. Every instance except a development instance requires https. A production instance also requires the host to be on one of the instance's domains.

Return

The prepared SessionTransfer, or a failure. The failure has the code invalid_arguments when destination is not an absolute http or https URL, signed_out when there is no active session, which includes a pending session, and session_changed when the active session changes before the transfer is ready.

Parameters

destination

The web URL to land on after the user is signed in.

presentation

Where the app opens the URL.