oauthgithub

package module
v0.1.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 8, 2026 License: MIT Imports: 8 Imported by: 0

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").

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL