requestAuthentication

fun requestAuthentication(fragment: Fragment, title: String, subtitle: String? = null, cancelText: String? = null, isDeviceCredentialsAllowed: Boolean = true, onSuccess: () -> Unit, onFailure: (errorCode: Int, errString: CharSequence) -> Unit)
fun requestAuthentication(activity: FragmentActivity, title: String, subtitle: String? = null, cancelText: String? = null, isDeviceCredentialsAllowed: Boolean = true, onSuccess: () -> Unit, onFailure: (errorCode: Int, errString: CharSequence) -> Unit)

If isDeviceCredentialsAllowed is set to truesetNegativeButtonText is not allowed because it will replace the negative button on the prompt. If isDeviceCredentialsAllowed is set to false, the negative button text must be set with the cancelText parameter or omit it to use the fallback cancel text.