# RemoteAuthClient.Callback

# RemoteAuthClient.Callback

Artifact: [androidx.wear:wear-phone-interactions](https://developer.android.com/jetpack/androidx/releases/wear)  
[View Source](https://cs.android.com/search?q=file:androidx/wear/phone/interactions/authentication/RemoteAuthClient.kt+class:androidx.wear.phone.interactions.authentication.RemoteAuthClient.Callback)  
Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear#1.0.0)

*** ** * ** ***

Kotlin \|[Java](https://developer.android.com/reference/androidx/wear/phone/interactions/authentication/RemoteAuthClient.Callback "View this page in Java")


```
abstract class RemoteAuthClient.Callback
```

<br />

*** ** * ** ***

This callback is notified when an async remote authentication request completes.

Typically, your app should update its UI to let the user aware of the success or failure.

## Summary

|                                                               ### Public constructors                                                               |
|-----------------------------------------------------------------------------------------------------------------------------------------------------|
| [Callback](https://developer.android.com/reference/kotlin/androidx/wear/phone/interactions/authentication/RemoteAuthClient.Callback#Callback())`()` |

|                                   ### Public functions                                   |
|------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `abstract `[Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | `@`[UiThread](https://developer.android.com/reference/kotlin/androidx/annotation/UiThread) [onAuthorizationError](https://developer.android.com/reference/kotlin/androidx/wear/phone/interactions/authentication/RemoteAuthClient.Callback#onAuthorizationError(androidx.wear.phone.interactions.authentication.OAuthRequest,kotlin.Int))`(request: `[OAuthRequest](https://developer.android.com/reference/kotlin/androidx/wear/phone/interactions/authentication/OAuthRequest)`, errorCode: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`)` Called when an async remote authentication request fails.                                                                                                                            |
| `abstract `[Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | `@`[UiThread](https://developer.android.com/reference/kotlin/androidx/annotation/UiThread) [onAuthorizationResponse](https://developer.android.com/reference/kotlin/androidx/wear/phone/interactions/authentication/RemoteAuthClient.Callback#onAuthorizationResponse(androidx.wear.phone.interactions.authentication.OAuthRequest,androidx.wear.phone.interactions.authentication.OAuthResponse))`(request: `[OAuthRequest](https://developer.android.com/reference/kotlin/androidx/wear/phone/interactions/authentication/OAuthRequest)`, response: `[OAuthResponse](https://developer.android.com/reference/kotlin/androidx/wear/phone/interactions/authentication/OAuthResponse)`)` Called when an async remote authentication request completes successfully. |

## Public constructors

### Callback

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear#1.0.0)  

```
Callback()
```  

## Public functions

### onAuthorizationError

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear#1.0.0)  

```
@UiThread
abstract fun onAuthorizationError(request: OAuthRequest, errorCode: Int): Unit
```

Called when an async remote authentication request fails.

see [sendAuthorizationRequest](https://developer.android.com/reference/kotlin/androidx/wear/phone/interactions/authentication/RemoteAuthClient#sendAuthorizationRequest(androidx.wear.phone.interactions.authentication.OAuthRequest,java.util.concurrent.Executor,androidx.wear.phone.interactions.authentication.RemoteAuthClient.Callback))  

### onAuthorizationResponse

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear#1.0.0)  

```
@UiThread
abstract fun onAuthorizationResponse(request: OAuthRequest, response: OAuthResponse): Unit
```

Called when an async remote authentication request completes successfully.

see [sendAuthorizationRequest](https://developer.android.com/reference/kotlin/androidx/wear/phone/interactions/authentication/RemoteAuthClient#sendAuthorizationRequest(androidx.wear.phone.interactions.authentication.OAuthRequest,java.util.concurrent.Executor,androidx.wear.phone.interactions.authentication.RemoteAuthClient.Callback))