GitHubIdp class

Main class for the GitHub identity provider. The methods defined here are intended to be called from an endpoint.

The admin property provides access to GitHubIdpAdmin, which contains admin-related methods for managing GitHub-backed accounts.

The utils property provides access to GitHubIdpUtils, which contains utility methods for working with GitHub-backed accounts. These can be used to implement custom authentication flows if needed.

If you would like to modify the authentication flow, consider creating custom implementations of the relevant methods.

Constructors

GitHubIdp(GitHubIdpConfig config, {required TokenIssuer tokenIssuer, AuthUsers authUsers = const AuthUsers(), UserProfiles userProfiles = const UserProfiles()})
Creates a new instance of GitHubIdp.
factory

Properties

admin GitHubIdpAdmin
Admin operations to work with GitHub-backed accounts.
final
config GitHubIdpConfig
The configuration for the GitHub identity provider.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
utils GitHubIdpUtils
Utility functions for the GitHub identity provider.
final

Methods

hasAccount(Session session) Future<bool>
Determines whether the current session has an associated GitHub account.
login(Session session, {required String code, required String codeVerifier, required String redirectUri, Transaction? transaction}) Future<AuthSuccess>
Validates a GitHub authorization code and either logs in the associated user or creates a new user account if the GitHub account ID is not yet known.
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

Constants

method → const String
The method used when authenticating with the GitHub identity provider.