Versions in this module Expand all Collapse all v0 v0.5.0 Nov 24, 2026 v0.4.0 Nov 19, 2026 Changes in this version + func AuthorizationURL(authEndpoint, clientID, redirectURI string, scopes []string, ...) string + func ExchangeCode(ctx context.Context, c oauth.ClientConfig, code, codeVerifier string) (*oauth.Token, error) + func ParseGitHubUser(data []byte) (providerID, username, avatarURL string, err error) + func ParseGitLabUser(data []byte) (providerID, username, avatarURL string, err error) + func ParseGoogleUser(data []byte) (providerID, username, avatarURL string, err error) + func RefreshAccessToken(ctx context.Context, c oauth.ClientConfig, refreshToken string) (*oauth.Token, error) + type PKCEChallenge struct + Challenge string + Verifier string + func NewPKCEChallenge() (PKCEChallenge, error) + type Provider interface + AuthURL func(r *http.Request, state string) string + OAuthClientConfig func(r *http.Request) oauth.ClientConfig + RedirectURI func(r *http.Request) string + type ProviderConfig struct + AuthEndpoint string + AuthParams url.Values + ClientID string + ClientSecret string + ParseUser func(data []byte) (providerID, username, avatarURL string, err error) + RedirectURIFunc RedirectURIFunc + Scopes []string + TokenURL string + UserInfoURL string + func NewGitHubConfig(clientID, clientSecret string, redirectURI RedirectURIFunc) *ProviderConfig + func NewGitLabConfig(clientID, clientSecret, gitlabURL string, redirectURI RedirectURIFunc) *ProviderConfig + func NewGoogleConfig(clientID, clientSecret string, redirectURI RedirectURIFunc) *ProviderConfig + func (c *ProviderConfig) AuthURL(r *http.Request, state string) string + func (c *ProviderConfig) FetchUser(ctx context.Context, accessToken string) (providerID, username, avatarURL string, err error) + func (c *ProviderConfig) OAuthClientConfig(r *http.Request) oauth.ClientConfig + func (c *ProviderConfig) RedirectURI(r *http.Request) string + type RedirectURIFunc func(r *http.Request) string + type RetrieveError struct + Body []byte + ErrorCode string + ErrorDescription string + ErrorURI string + StatusCode int + func (e *RetrieveError) Error() string