Documentation
¶
Index ¶
Constants ¶
Variables ¶
View Source
var ( ErrDBIsRequired = errors.New("db is required") ErrCreatingFlow = errors.New("error creating flow") ErrCompletingFlow = errors.New("error completing flow") ErrInvalidNextURL = errors.New("invalid next URL") ErrInvalidToken = errors.New("invalid token") ErrInvalidSecret = errors.New("invalid secret") )
Functions ¶
This section is empty.
Types ¶
type Magic ¶
type Magic struct {
// contains filtered or unexported fields
}
func (*Magic) CompleteFlow ¶
func (*Magic) CreateFlow ¶
func (c *Magic) CreateFlow(ctx context.Context, emailAddress string, deviceIdentifier pgtype.UUID, userIdentifier pgtype.UUID, nextURL string) (string, error)
CreateFlow creates a new magic link flow Called from API handler - inputs should be pre-validated pgx types Defensive check: validates deviceIdentifier.Valid and userIdentifier.Valid if provided Note: emailAddress and nextURL are strings (not database IDs)
Click to show internal directories.
Click to hide internal directories.