Interface GitHubStrategyOptions

interface GitHubStrategyOptions {
    allowSignup?: boolean;
    authenticateWith?: "http_basic_auth" | "request_body";
    authorizationEndpoint?: string | URL;
    clientId: string;
    clientSecret: string;
    codeChallengeMethod?: "S256" | "plain";
    redirectURI: string | URL;
    scopes?: GitHubScope[];
    tokenEndpoint?: string | URL;
    tokenRevocationEndpoint?: string | URL;
    userAgent?: string;
    userEmailsEndpoint?: string | URL;
    userInfoEndpoint?: string | URL;
}

Hierarchy

  • Omit<OAuth2StrategyOptions, "scopes" | "authorizationEndpoint" | "tokenEndpoint">
    • GitHubStrategyOptions

Properties

allowSignup?: boolean
authenticateWith?: "http_basic_auth" | "request_body"

The method to use to authenticate with the Identity Provider, this can be either http_basic_auth or request_body.

"request_body"
authorizationEndpoint?: string | URL
clientId: string

This is the Client ID of your application, provided to you by the Identity Provider you're using to authenticate users.

clientSecret: string

This is the Client Secret of your application, provided to you by the Identity Provider you're using to authenticate users.

codeChallengeMethod?: "S256" | "plain"

The code challenge method to use when sending the authorization request. This is used when the Identity Provider requires a code challenge to be sent with the authorization request.

"S256"
redirectURI: string | URL

The URL of your application where the Identity Provider will redirect the user after they've logged in or authorized your application.

scopes?: GitHubScope[]
tokenEndpoint?: string | URL
tokenRevocationEndpoint?: string | URL

The endpoint the Identity Provider uses to revoke an access or refresh token, this can be useful to log out the user.

userAgent?: string
userEmailsEndpoint?: string | URL
userInfoEndpoint?: string | URL