magic

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2025 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Magic

type Magic struct {
	// contains filtered or unexported fields
}

func New

func New(options options.Options, logger types.Logger) *Magic

func (*Magic) Register

func (m *Magic) Register(prefixes []string, group huma.API)

type MagicCallbackRequest

type MagicCallbackRequest struct {
	Token string `query:"token" required:"true" doc:"magic link token"`
}

type MagicCallbackResponse

type MagicCallbackResponse struct {
	SessionCookie *http.Cookie `header:"Set-Cookie" doc:"session cookie"`
	Location      string       `header:"Location" required:"true" doc:"redirect to next URL"`
}

type MagicLoginRequest

type MagicLoginRequest struct {
	Email string `query:"email" required:"true" doc:"email address"`
	Next  string `query:"next" required:"true" doc:"redirect URL after authentication"`
	Code  string `query:"code" required:"false" minLength:"8" maxLength:"8" doc:"optional device flow code"`
}

Jump to

Keyboard shortcuts

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