Versions in this module Expand all Collapse all v1 v1.5.0 Jun 27, 2026 Changes in this version + const DefaultAuthTimeout + var ErrPromptDeclined = errors.New("authorization declined by user") + var ErrPromptUnavailable = errors.New("authorization prompt could not be delivered") + func GitHubEndpoint(host string) oauth2.Endpoint + func NormalizeHost(host string) string + type Config struct + CallbackPort int + ClientID string + ClientSecret string + Endpoint oauth2.Endpoint + Scopes []string + func NewGitHubConfig(clientID, clientSecret string, scopes []string, host string, callbackPort int) Config + type Manager struct + func NewManager(cfg Config, logger *slog.Logger) *Manager + func (m *Manager) AccessToken() string + func (m *Manager) Authenticate(ctx context.Context, prompter Prompter) (*Outcome, error) + func (m *Manager) HasToken() bool + type Outcome struct + UserAction *UserAction + type Prompt struct + Message string + URL string + UserCode string + type Prompter interface + CanPromptForm func() bool + CanPromptURL func() bool + PromptForm func(ctx context.Context, p Prompt) error + PromptURL func(ctx context.Context, p Prompt) error + type UserAction struct + Message string + URL string + UserCode string