redeemOtp

fun redeemOtp(url: String, otp: String, callback: (Result<RedeemOtpResponse>) -> Unit)

Redeems an OTP for a grant code.

Parameters

url

The authentication URL of the current transaction.

otp

The OTP to redeem.

callback

Result of RedeemOtpResponse that resolves to an AuthenticateResponse on success or an OtpChallengeResponse on failure to authenticate with the provided OTP code. Use on retry. or Throwable.


fun redeemOtp(url: String, otp: String, dispatcher: CoroutineDispatcher = Dispatchers.Default): Flow<Result<RedeemOtpResponse>>

Redeems an OTP for a grant code.

Return

Flow of RedeemOtpResponse that resolves to an AuthenticateResponse on success or an OtpChallengeResponse on failure to authenticate with the provided OTP code. Use on retry. or Throwable.

Parameters

url

The authentication URL of the current transaction.

otp

The OTP to redeem.