# AuthTabIntent.AuthenticateUserResultContract

Artifact: [androidx.browser:browser](https://developer.android.com/jetpack/androidx/releases/browser) [View Source](https://cs.android.com/search?q=file:androidx/browser/auth/AuthTabIntent.java+class:androidx.browser.auth.AuthTabIntent.AuthenticateUserResultContract) Added in [1.10.0](https://developer.android.com/jetpack/androidx/releases/browser#1.10.0)

*** ** * ** ***


```
class AuthTabIntent.AuthenticateUserResultContract : ActivityResultContract<Intent!, AuthTabIntent.AuthResult!>
```

<br />

|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html) |||
| ↳ | [androidx.activity.result.contract.ActivityResultContract](https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContract)\<[Intent](https://developer.android.com/reference/android/content/Intent.html)!, [AuthTabIntent.AuthResult](https://developer.android.com/reference/kotlin/androidx/browser/auth/AuthTabIntent.AuthResult)!\> ||
|   | ↳ | [androidx.browser.auth.AuthTabIntent.AuthenticateUserResultContract](https://developer.android.com/reference/kotlin/androidx/browser/auth/AuthTabIntent.AuthenticateUserResultContract) |

*** ** * ** ***

An `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContract` for launching an Auth Tab and receiving the result. This contract takes the launch `https://developer.android.com/reference/android/content/Intent.html` as input and produces an `https://developer.android.com/reference/kotlin/androidx/browser/auth/AuthTabIntent.AuthResult` as output.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/browser/auth/AuthTabIntent.AuthenticateUserResultContract#AuthenticateUserResultContract()()` |

| ### Public functions |
|---|---|
| `https://developer.android.com/reference/android/content/Intent.html` | `https://developer.android.com/reference/kotlin/androidx/browser/auth/AuthTabIntent.AuthenticateUserResultContract#createIntent(android.content.Context,android.content.Intent)(context: https://developer.android.com/reference/android/content/Context.html, input: https://developer.android.com/reference/android/content/Intent.html)` Creates the `https://developer.android.com/reference/android/content/Intent.html` to be used to launch the Auth Tab activity. |
| `https://developer.android.com/reference/kotlin/androidx/browser/auth/AuthTabIntent.AuthResult` | `https://developer.android.com/reference/kotlin/androidx/browser/auth/AuthTabIntent.AuthenticateUserResultContract#parseResult(int,android.content.Intent)(resultCode: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, intent: https://developer.android.com/reference/android/content/Intent.html?)` Parses the result from the Auth Tab into an `https://developer.android.com/reference/kotlin/androidx/browser/auth/AuthTabIntent.AuthResult`. |

### Inherited functions

From [androidx.activity.result.contract.ActivityResultContract](https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContract) `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContract.SynchronousResult<O!>!` `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContract#getSynchronousResult(android.content.Context,I)(context: https://developer.android.com/reference/android/content/Context.html!, input: I!)`

An optional method you can implement that can be used to potentially provide a result in lieu of starting an activity.

## Public constructors

### AuthenticateUserResultContract

Added in 1.10.0

```
AuthenticateUserResultContract()
```

## Public functions

### createIntent

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

```
fun createIntent(context: Context, input: Intent): Intent
```

Creates the `https://developer.android.com/reference/android/content/Intent.html` to be used to launch the Auth Tab activity.

| Parameters |
|---|---|
| `context: https://developer.android.com/reference/android/content/Context.html` | The context from which the activity is being launched. |
| `input: https://developer.android.com/reference/android/content/Intent.html` | The `https://developer.android.com/reference/android/content/Intent.html` built by `https://developer.android.com/reference/kotlin/androidx/browser/auth/AuthTabIntent.Builder`. |

| Returns |
|---|---|
| `https://developer.android.com/reference/android/content/Intent.html` | The same `https://developer.android.com/reference/android/content/Intent.html` that was passed as input, which will be used to start the activity. |

### parseResult

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

```
fun parseResult(resultCode: Int, intent: Intent?): AuthTabIntent.AuthResult
```

Parses the result from the Auth Tab into an `https://developer.android.com/reference/kotlin/androidx/browser/auth/AuthTabIntent.AuthResult`.

| Parameters |
|---|---|
| `resultCode: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The result code returned by the activity. |
| `intent: https://developer.android.com/reference/android/content/Intent.html?` | The `https://developer.android.com/reference/android/content/Intent.html` returned by the activity, which may contain result data. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/browser/auth/AuthTabIntent.AuthResult` | An `https://developer.android.com/reference/kotlin/androidx/browser/auth/AuthTabIntent.AuthResult` representing the outcome of the authentication flow. |