Webcom Android SDK Public API Reference / com.orange.webcom.sdkv2.authentication.methods / OneTimePasswordMethod / authenticate

authenticate

@JvmOverloads fun authenticate(oneTimePassword: String, context: AuthenticationService.Context = Context.New, callback: WebcomResultCallback<AuthenticationDetails>? = null): Unit

Authenticates the user with the oneTimePassword s·he has just received, as the final step of an authentication call-flow. This operation is asynchronous and calls the given callback with the authentication result once performed.

This method fails if the first step of the call-flow (ie. calling sendOneTimePassword) has not been performed.

In order to perform a multi-factor authentication, context must be set to Context.Current and the user to authenticate must already be authenticated with an other method (or factor).