# GithubAuthProvider


```
public class GithubAuthProvider
```

<br />

*** ** * ** ***

Represents the GitHub authentication provider. Use this class to obtain instances of `https://firebase.google.com/docs/reference/android/com/google/firebase/auth/GithubAuthCredential`.

## Summary

| ### Constants |
|---|---|
| `static final https://developer.android.com/reference/java/lang/String.html` | `https://firebase.google.com/docs/reference/android/com/google/firebase/auth/GithubAuthProvider#GITHUB_SIGN_IN_METHOD() = "github.com"` Unique string identifier for Github sign-in method. |
| `static final https://developer.android.com/reference/java/lang/String.html` | `https://firebase.google.com/docs/reference/android/com/google/firebase/auth/GithubAuthProvider#PROVIDER_ID() = "github.com"` Unique string identifier for this provider type. |

| ### Public methods |
|---|---|
| `static @https://developer.android.com/reference/androidx/annotation/NonNull.html https://firebase.google.com/docs/reference/android/com/google/firebase/auth/AuthCredential` | `https://firebase.google.com/docs/reference/android/com/google/firebase/auth/GithubAuthProvider#getCredential(java.lang.String)(@https://developer.android.com/reference/androidx/annotation/NonNull.html https://developer.android.com/reference/java/lang/String.html token)` Returns a new instance of `https://firebase.google.com/docs/reference/android/com/google/firebase/auth/AuthCredential` that wraps a Github OAuth token. |

## Constants

### GITHUB_SIGN_IN_METHOD

```
public static final String GITHUB_SIGN_IN_METHOD = "github.com"
```

Unique string identifier for Github sign-in method.

### PROVIDER_ID

```
public static final String PROVIDER_ID = "github.com"
```

Unique string identifier for this provider type.

## Public methods

### getCredential

```
public static @NonNull AuthCredential getCredential(@NonNull String token)
```

Returns a new instance of `https://firebase.google.com/docs/reference/android/com/google/firebase/auth/AuthCredential` that wraps a Github OAuth token. Used when calling `https://firebase.google.com/docs/reference/android/com/google/firebase/auth/FirebaseAuth#signInWithCredential(com.google.firebase.auth.AuthCredential)` or `https://firebase.google.com/docs/reference/android/com/google/firebase/auth/FirebaseUser#linkWithCredential(com.google.firebase.auth.AuthCredential)`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull.html https://developer.android.com/reference/java/lang/String.html token` | A valid Github OAuth access token, obtained from the Github OAuth flow |