# AuthCredential


```
public abstract class AuthCredential implements Parcelable
```

<br />

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

|---|---|
| `https://firebase.google.com/docs/reference/android/com/google/firebase/auth/EmailAuthCredential` | Wraps an email and password tuple for authentication purposes. |
| `https://firebase.google.com/docs/reference/android/com/google/firebase/auth/FacebookAuthCredential` | Wraps a Facebook Login access token for authentication purposes. |
| `https://firebase.google.com/docs/reference/android/com/google/firebase/auth/GithubAuthCredential` | Wraps a Github OAuth access token for authentication purposes. |
| `https://firebase.google.com/docs/reference/android/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/android/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/android/com/google/firebase/auth/PhoneAuthCredential` | Wraps phone number and verification information for authentication purposes. |
| `https://firebase.google.com/docs/reference/android/com/google/firebase/auth/PlayGamesAuthCredential` | Wraps a Google Play Games Server Auth Code, for authentication purposes. |
| `https://firebase.google.com/docs/reference/android/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 methods |
|---|---|
| `abstract @https://developer.android.com/reference/androidx/annotation/NonNull.html https://developer.android.com/reference/java/lang/String.html` | `https://firebase.google.com/docs/reference/android/com/google/firebase/auth/AuthCredential#getProvider()()` Returns the unique string identifier for the provider type with which the credential is associated. |
| `abstract @https://developer.android.com/reference/androidx/annotation/NonNull.html https://developer.android.com/reference/java/lang/String.html` | `https://firebase.google.com/docs/reference/android/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) `static final int` `https://developer.android.com/reference/android/os/Parcelable.html#CONTENTS_FILE_DESCRIPTOR = 1` `static final int` `https://developer.android.com/reference/android/os/Parcelable.html#PARCELABLE_WRITE_RETURN_VALUE = 1`

### Inherited methods

From [android.os.Parcelable](https://developer.android.com/reference/android/os/Parcelable.html) `abstract int` `https://developer.android.com/reference/android/os/Parcelable.html#describeContents()()` `abstract void` `https://developer.android.com/reference/android/os/Parcelable.html#writeToParcel(android.os.Parcel, int)(https://developer.android.com/reference/android/os/Parcel.html p, int p1)`

## Public methods

### getProvider

```
public abstract @NonNull String getProvider()
```

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

### getSignInMethod

```
public abstract @NonNull String getSignInMethod()
```

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/android/com/google/firebase/auth/FirebaseAuth#fetchSignInMethodsForEmail(java.lang.String)` after this user has signed in with this type of credential.