GitHubIdpConfig class

Configuration for the GitHub identity provider.

This class implements both IdentityProviderBuilder and OAuth2PkceServerConfig for generic OAuth2 PKCE token exchange.

Inheritance
Implementers

Constructors

GitHubIdpConfig({required String clientId, required String clientSecret, GitHubAccountDetailsValidation githubAccountDetailsValidation = validateGitHubAccountDetails, GetExtraGitHubInfoCallback? getExtraGitHubInfoCallback})
Creates a new instance of GitHubIdpConfig.

Properties

clientId String
The client ID from your GitHub OAuth App.
final
clientSecret String
The client secret from your GitHub OAuth App.
final
getExtraGitHubInfoCallback GetExtraGitHubInfoCallback?
Callback that can be used with the access token to extract additional information from GitHub.
final
githubAccountDetailsValidation GitHubAccountDetailsValidation
Validation function for GitHub account details.
final
hashCode int
The hash code for this object.
no setterinherited
oauth2Config OAuth2PkceServerConfig
OAuth2 PKCE server config for GitHub.
latefinal
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
type Type
The type of the provider that this builder creates. Used to store the provider in the AuthConfig.
no setterinherited

Methods

build({required TokenManager tokenManager, required AuthUsers authUsers, required UserProfiles userProfiles}) GitHubIdp
Builds a new instance of the identity provider.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

parseTokenResponse(Map<String, dynamic> responseBody) OAuth2PkceTokenResponse
Default GitHub token response parser for OAuth2PkceServerConfig.
validateGitHubAccountDetails(GitHubAccountDetails accountDetails) → void
Default validation function for extracting additional GitHub account details.