# AuthCredential


```
abstract class AuthCredential : Parcelable
```

<br />

Known direct subclasses [EmailAuthCredential](https://firebase.google.com/docs/reference/kotlin/com/google/firebase/auth/EmailAuthCredential), [FacebookAuthCredential](https://firebase.google.com/docs/reference/kotlin/com/google/firebase/auth/FacebookAuthCredential), [GithubAuthCredential](https://firebase.google.com/docs/reference/kotlin/com/google/firebase/auth/GithubAuthCredential), [GoogleAuthCredential](https://firebase.google.com/docs/reference/kotlin/com/google/firebase/auth/GoogleAuthCredential), [OAuthCredential](https://firebase.google.com/docs/reference/kotlin/com/google/firebase/auth/OAuthCredential), [PhoneAuthCredential](https://firebase.google.com/docs/reference/kotlin/com/google/firebase/auth/PhoneAuthCredential), [PlayGamesAuthCredential](https://firebase.google.com/docs/reference/kotlin/com/google/firebase/auth/PlayGamesAuthCredential), [TwitterAuthCredential](https://firebase.google.com/docs/reference/kotlin/com/google/firebase/auth/TwitterAuthCredential)

|---|---|
| `https://firebase.google.com/docs/reference/kotlin/com/google/firebase/auth/EmailAuthCredential` | Wraps an email and password tuple for authentication purposes. |
| `https://firebase.google.com/docs/reference/kotlin/com/google/firebase/auth/FacebookAuthCredential` | Wraps a Facebook Login access token for authentication purposes. |
| `https://firebase.google.com/docs/reference/kotlin/com/google/firebase/auth/GithubAuthCredential` | Wraps a Github OAuth access token for authentication purposes. |
| `https://firebase.google.com/docs/reference/kotlin/com/google/firebase/auth/GoogleAuthCredential` | Wraps a Google Sign-In ID token and/or access token, for authentication purposes. |
| `https://firebase.google.com/docs/reference/kotlin/com/google/firebase/auth/OAuthCredential` | Holds credentials generated by a sign-in with a credential to an IDP that uses OAuth |
| `https://firebase.google.com/docs/reference/kotlin/com/google/firebase/auth/PhoneAuthCredential` | Wraps phone number and verification information for authentication purposes. |
| `https://firebase.google.com/docs/reference/kotlin/com/google/firebase/auth/PlayGamesAuthCredential` | Wraps a Google Play Games Server Auth Code, for authentication purposes. |
| `https://firebase.google.com/docs/reference/kotlin/com/google/firebase/auth/TwitterAuthCredential` | Wraps a Log in with Twitter token and secret tuple for authentication purposes. |

*** ** * ** ***

Represents a credential that the Firebase Authentication server can use to authenticate a user.

## Summary

| ### Public functions |
|---|---|
| `abstract https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html` | `https://firebase.google.com/docs/reference/kotlin/com/google/firebase/auth/AuthCredential#getProvider()()` Returns the unique string identifier for the provider type with which the credential is associated. |
| `abstract https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html` | `https://firebase.google.com/docs/reference/kotlin/com/google/firebase/auth/AuthCredential#getSignInMethod()()` Returns the unique string identifier for the sign in method with which the credential is associated. |

### Inherited Constants

From [android.os.Parcelable](https://developer.android.com/reference/android/os/Parcelable.html) `const https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/os/Parcelable.html#CONTENTS_FILE_DESCRIPTOR = 1` `const https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/os/Parcelable.html#PARCELABLE_WRITE_RETURN_VALUE = 1`

### Inherited functions

From [android.os.Parcelable](https://developer.android.com/reference/android/os/Parcelable.html) `abstract https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/os/Parcelable.html#describeContents()()` `abstract https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/os/Parcelable.html#writeToParcel(android.os.Parcel, int)(p: https://developer.android.com/reference/android/os/Parcel.html!, p1: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`

## Public functions

### getProvider

```
abstract fun getProvider(): String
```

Returns the unique string identifier for the provider type with which the credential is associated.

### getSignInMethod

```
abstract fun getSignInMethod(): String
```

Returns the unique string identifier for the sign in method with which the credential is associated. Should match that returned by `https://firebase.google.com/docs/reference/kotlin/com/google/firebase/auth/FirebaseAuth#fetchSignInMethodsForEmail(java.lang.String)` after this user has signed in with this type of credential.