StytchB2BClient

object StytchB2BClient

The StytchB2BClient object is your entrypoint to the Stytch B2B SDK and is how you interact with all of our supported authentication products.

Functions

Link copied to clipboard
fun canHandle(uri: Uri): Boolean

A helper function for determining whether the deeplink is intended for Stytch. Useful in contexts where your application makes use of a deeplink coordinator/manager which requires a synchronous determination of whether a given handler can handle a given URL.

Link copied to clipboard
fun configure(context: Context, publicToken: String)

This configures the API for authenticating requests and the encrypted storage helper for persisting session data across app launches. You must call this method before making any Stytch authentication requests.

Link copied to clipboard
suspend fun handle(uri: Uri, sessionDurationMinutes: UInt): DeeplinkHandledStatus
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: B2B Email Magic Links.

Properties

Link copied to clipboard
var magicLinks: B2BMagicLinks

Exposes an instance of the B2BMagicLinks interface whicih provides methods for sending and authenticating users with Email Magic Links.

Link copied to clipboard
var member: Member

Exposes an instance of the Member interface which provides methods for retrieving the current authenticated user.

Link copied to clipboard
var organization: Organization

Exposes an instance of the Organization interface which provides methods for retrieving the current authenticated user's organization.

Link copied to clipboard
var sessions: B2BSessions

Exposes an instance of the B2BSessions interface which provides methods for authenticating, updating, or revoking sessions, and properties to retrieve the existing session token (opaque or JWT).