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

*** ** * ** ***


```
public 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 |
|---|
| `https://developer.android.com/reference/androidx/wear/phone/interactions/authentication/RemoteAuthClient.Callback#Callback()()` |

| ### Public methods |
|---|---|
| `abstract void` | `@https://developer.android.com/reference/androidx/annotation/UiThread https://developer.android.com/reference/androidx/wear/phone/interactions/authentication/RemoteAuthClient.Callback#onAuthorizationError(androidx.wear.phone.interactions.authentication.OAuthRequest,kotlin.Int)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/phone/interactions/authentication/OAuthRequest request, int errorCode)` Called when an async remote authentication request fails. |
| `abstract void` | `@https://developer.android.com/reference/androidx/annotation/UiThread https://developer.android.com/reference/androidx/wear/phone/interactions/authentication/RemoteAuthClient.Callback#onAuthorizationResponse(androidx.wear.phone.interactions.authentication.OAuthRequest,androidx.wear.phone.interactions.authentication.OAuthResponse)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/phone/interactions/authentication/OAuthRequest request, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/wear/phone/interactions/authentication/OAuthResponse response )` 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)

```
public Callback()
```

## Public methods

### onAuthorizationError

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

```
@UiThread
public abstract void onAuthorizationError(@NonNull OAuthRequest request, int errorCode)
```

Called when an async remote authentication request fails.

see `https://developer.android.com/reference/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
public abstract void onAuthorizationResponse(
    @NonNull OAuthRequest request,
    @NonNull OAuthResponse response
)
```

Called when an async remote authentication request completes successfully.

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