Versions in this module Expand all Collapse all v0 v0.1.1 Jul 24, 2026 v0.1.0 Jul 23, 2026 Changes in this version + type Auth struct + func New(ctx context.Context, cfg Config, opts ...Option) (*Auth, error) + func NewFromEnv(ctx context.Context, opts ...Option) (*Auth, error) + func (a *Auth) CallbackHandler() http.Handler + func (a *Auth) CallbackPath() string + func (a *Auth) ClearSession(w http.ResponseWriter) + func (a *Auth) LoginHandler() http.Handler + func (a *Auth) LoginPath() string + func (a *Auth) LogoutHandler() http.Handler + func (a *Auth) LogoutPath() string + func (a *Auth) Mount(mux *http.ServeMux) + func (a *Auth) RequireAuth(next http.Handler) http.Handler + func (a *Auth) User(r *http.Request) (u User, ok bool) + type Config struct + ClientID string + ClientSecret string + CookieSecret string + Issuer string + RedirectURL string + func FromEnv() (Config, error) + type Option func(*Auth) error + func ForceApprovalIfNewUser(known func(sub string) bool) Option + func WithCookieName(name string) Option + func WithExtraClaims(names ...string) Option + func WithForceConsentParams(params map[string]string) Option + func WithLoginPath(p string) Option + func WithLogoutPath(p string) Option + func WithPostLogoutRedirect(p string) Option + func WithSessionTTL(d time.Duration) Option + type User struct + Email string + EmailVerified bool + Extra map[string]json.RawMessage + Issuer string + Name string + Sub string + func UserFromContext(ctx context.Context) (u User, ok bool)