GithubAuthProvider

public classGithubAuthProvider


Represents the Github authentication provider. Use this class to obtain s.

Summary

Constants

static finalString
GITHUB_SIGN_IN_METHOD = "github.com"

Unique string identifier for Github sign-in method.

static finalString
PROVIDER_ID = "github.com"

Unique string identifier for this provider type.

Public methods

static @NonNullAuthCredential

Returns a new instance ofAuthCredential 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 @NonNullAuthCredential getCredential(@NonNullString token)

Returns a new instance ofAuthCredential that wraps a Github OAuth token. Used when callingsignInWithCredential orlinkWithCredential.

Parameters
@NonNullString token

A valid Github OAuth access token, obtained from the Github OAuth flow

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-07-21 UTC.