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 DefaultMountPrefix + const DefaultPage + const DefaultTTL + const EndpointSend + const EndpointSignIn + const EndpointVerify + const PluginName + const PurposeSignIn + var ErrBadKinds = errors.New(...) + var ErrCallbackInvalid = auth.NewError("magiclink.callback_invalid", http.StatusBadRequest, ...) + var ErrNoBase = errors.New("magiclink: links need auth.WithBaseURL or magiclink.Links") + var ErrNoKinds = errors.New(...) + type Option func(*Plugin) + func GenerateToken(fn TokenGenerator) Option + func Kinds(kinds ...auth.IdentifierKindName) Option + func Links(fn func(t auth.Token) string) Option + func SignUp() Option + func VerifyByGET() Option + func WithIPLimit(n int, window time.Duration) Option + func WithSendLimit(n int, window time.Duration) Option + func WithTTL(d time.Duration) Option + type Plugin struct + func New(opts ...Option) *Plugin + func (p *Plugin) Init(a *auth.Auth) error + func (p *Plugin) Name() string + func (p *Plugin) Operations() []auth.Operation + func (p *Plugin) OptionErr() error + func (p *Plugin) RateLimits() []auth.RateRule + func (p *Plugin) Send(ctx context.Context, identifier string) error + func (p *Plugin) SendAs(ctx context.Context, identifier, name string) error + func (p *Plugin) SendWith(ctx context.Context, in SendRequest) error + func (p *Plugin) SendWithMetadata(ctx context.Context, identifier string, metadata map[string]string) error + func (p *Plugin) SignIn(ctx context.Context, t auth.Token) (SignInResult, error) + func (p *Plugin) SignsIn() bool + func (p *Plugin) Validate(c *auth.Config) error + type SendRequest struct + CallbackURL string + ErrorCallbackURL string + Identifier string + Metadata map[string]string + Name string + NewUserCallbackURL string + func (r SendRequest) RateIdentifier() string + type SignInRequest struct + Token auth.WireToken + type SignInResult struct + Created bool + SecondFactorRequired bool + Token auth.Token + User auth.UserView + type TokenGenerator func(ctx context.Context, identifier string) (string, error) + type VerifyRequest struct + CallbackURL string + ErrorCallbackURL string + NewUserCallbackURL string + Token auth.WireToken