authWithPhone

fun authWithPhone(id: String, challenge: String, password: String)

Authenticates a user using her/his phone number. This method requires sending beforehand a one-time-password (OTP) to the user using the Webcom.sendOtp method. This operation is performed asynchronously. Upon authentication completion or failure, the registered authentication callbacks are called (see Webcom.registerAuthCallback).

Parameters

id

The MSISDN (without the "+" prefix) of the user to authenticate

challenge

The identifier of the OTP previously sent to the user

password

The OTP received by the user

fun authWithPhone(id: String, challenge: String, password: String, callback: OnAuth?)

Authenticates a user using her/his phone number. This method requires sending beforehand a one-time-password (OTP) to the user using the Webcom.sendOtp method. This operation is performed asynchronously. Upon authentication completion or failure, the registered authentication callbacks are called (see Webcom.registerAuthCallback).

Parameters

id

The MSISDN (without the "+" prefix) of the user to authenticate

challenge

The identifier of the OTP previously sent to the user

password

The OTP received by the user

callback

The callback called when the authentication completes or fails. In case of success, OnAuth.onComplete is called with an object representing the authenticated user