providers/github library
This library contains the GitHub authentication provider for the Serverpod Idp module.
Classes
- AuthSuccess
- Response model representing a successful authentication result with all relevant authentication information.
- GitHubAccount
- A fully configured GitHub account to be used for logins.
- GitHubIdp
- Main class for the GitHub identity provider. The methods defined here are intended to be called from an endpoint.
- GitHubIdpAdmin
- Collection of GitHub-account admin methods.
- GitHubIdpBaseEndpoint
- Base endpoint for GitHub Account-based authentication.
- GitHubIdpConfig
- Configuration for the GitHub identity provider.
- GitHubIdpConfigFromPasswords
-
Creates a new GitHubIdpConfig from keys on the
passwords.yamlfile. - GitHubIdpUtils
- Utility functions for the GitHub identity provider.
Extensions
- GitHubIdpGetter on AuthServices
- Extension to get the GitHubIdp instance from the AuthServices.
Typedefs
-
GetExtraGitHubInfoCallback
= Future<
void> Function(Session session, {required String accessToken, required GitHubAccountDetails accountDetails, required Transaction? transaction}) -
Function to be called to extract additional information from GitHub APIs
using the access token. The
sessionandtransactioncan be used to store additional information in the database. - GitHubAccountDetails = ({String? email, Uri? image, String? name, String userIdentifier})
- Details of the GitHub Account.
- GitHubAccountDetailsValidation = void Function(GitHubAccountDetails accountDetails)
- Function to be called to check whether a GitHub account details match the requirements during registration.
-
GitHubAuthSuccess
= ({UuidValue authUserId, GitHubAccountDetails details, UuidValue githubAccountId, bool newAccount, Set<
Scope> scopes}) - Result of a successful authentication using GitHub as identity provider.
Exceptions / Errors
- GitHubAccessTokenVerificationException
- Exception to be thrown if the GitHub access token verification fails.
- GitHubUserInfoMissingDataException
- Exception thrown when the user info from GitHub is missing required data.