Versions in this module Expand all Collapse all v0 v0.1.1 Nov 12, 2026 v0.1.0 Oct 14, 2026 Changes in this version + const ColAt + const ColMethod + const DefaultCookieMaxAge + const DefaultCookieName + const EndpointClear + const EndpointMethod + const PluginName + var At = sqlb.Col[*time.Time](auth.TableUser, ColAt) + var ErrBadCookieAge = errors.New("lastlogin: WithCookie needs a maxAge of zero (the default) or more") + var Method = sqlb.Col[string](auth.TableUser, ColMethod) + func Bindings(c *LastLoginColumns) []sqlb.Binding + func DefaultResolver(_ context.Context, op auth.OpInfo, _ auth.Session) string + type ConsentFunc func(ctx context.Context) bool + type LastLoginColumns struct + LastLoginAt *time.Time + LastLoginMethod string + type MethodResult struct + Method string + type Option func(*Plugin) + func WithCookie(name string, maxAge time.Duration) Option + func WithCookieConsent(fn ConsentFunc) Option + func WithResolver(fn Resolver) Option + type Plugin struct + func New(opts ...Option) *Plugin + func (p *Plugin) Columns() []auth.ColumnExtension + func (p *Plugin) DataHooks() auth.DataHooks + func (p *Plugin) Init(a *auth.Auth) error + func (p *Plugin) Name() string + func (p *Plugin) Of(ctx context.Context, userID string) (LastLoginColumns, error) + func (p *Plugin) OperationHooks() []auth.OperationHook + func (p *Plugin) Operations() []auth.Operation + func (p *Plugin) OptionErr() error + func (p *Plugin) Validate(*auth.Config) error + type Resolver func(ctx context.Context, op auth.OpInfo, s auth.Session) string