configure

fun configure(context: Context, publicToken: String, options: StytchClientOptions = StytchClientOptions(), callback: (Boolean) -> Unit = {})

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.

Parameters

context

The applicationContext of your app

publicToken

Available via the Stytch dashboard in the API keys section

options

Optional options to configure the StytchB2BClient

callback

An optional callback that is triggered after configuration and initialization has completed

Throws

  • if we failed to initialize for any reason


fun configure(context: Context, publicToken: String, callback: (Boolean) -> Unit = {})

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.

Parameters

context

The applicationContext of your app

publicToken

Available via the Stytch dashboard in the API keys section

callback

An optional callback that is triggered after configuration and initialization has completed

Throws

  • if we failed to initialize for any reason


fun configure(context: Context, publicToken: String, options: StytchClientOptions = StytchClientOptions())

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.

Parameters

context

The applicationContext of your app

publicToken

Available via the Stytch dashboard in the API keys section

options

Optional options to configure the StytchClient

Throws

  • if we failed to initialize for any reason


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.

Parameters

context

The applicationContext of your app

publicToken

Available via the Stytch dashboard in the API keys section