Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(opts ...ConfigOption) oauth.Provider
Types ¶
type ConfigOption ¶
type ConfigOption func(*config)
ConfigOption configures the GitHub OAuth plugin.
func WithClientID ¶
func WithClientID(id string) ConfigOption
WithClientID sets the GitHub OAuth2 client ID. Defaults to env var GITHUB_CLIENT_ID.
func WithClientSecret ¶
func WithClientSecret(secret string) ConfigOption
WithClientSecret sets the GitHub OAuth2 client secret. Defaults to env var GITHUB_CLIENT_SECRET.
func WithOption ¶
func WithOption(key, value string) ConfigOption
WithOption sets any additional OAuth2 options.
func WithRedirectURL ¶
func WithRedirectURL(url string) ConfigOption
WithRedirectURL sets the callback URL registered in GitHub OAuth App settings.
func WithScopes ¶
func WithScopes(scopes ...string) ConfigOption
WithScopes sets the OAuth2 scopes (e.g. "user:email", "read:user").
Click to show internal directories.
Click to hide internal directories.