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

authenticate

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

Delegates the authentication of the user to the third-party provider associated with this OAuth2Method instance. This operation is asynchronous and calls the given callback with the authentication result once performed.

Depending on whether the Webcom Authentication Service already knows the authenticated identity (which is managed externally), this operation either:

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).