Documentation
¶
Overview ¶
Package github is Sign in with GitHub for identity: OAuth 2.0 with PKCE, the user read from the REST API.
auth := identity.MustNew(cfg.Auth, d, identity.Providers(github.New(cfg.Auth.Providers["github"])))
It reads, from auth.providers.github: client_id and client_secret (an OAuth app of the GitHub settings), redirect_url (the app's callback: https://api.example.com/auth/github/callback), scopes (read:user and user:email by default) and endpoint (a GitHub Enterprise server, https://github.example.com; github.com unless set). It refuses hosted_domain, team_id and key_id.
The account id is GitHub's numeric user id, stable across renames. The email is the one /user shows, or else the primary verified address of /user/emails; without either, the identity has no email and cannot create an account (it can still be linked to one).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
This section is empty.