configure

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