Documentation
¶
Index ¶
- type Service
- func (s *Service) ResetPassword(ctx context.Context, token, newPassword string) error
- func (s *Service) SendMagicLink(ctx context.Context, email string) error
- func (s *Service) SendPasswordResetEmail(ctx context.Context, email string) error
- func (s *Service) ValidateMagicLink(ctx context.Context, token string) (string, error)
- func (s *Service) VerifyEmail(ctx context.Context, token string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service handles email-related flows: verification, password reset, magic links. For MVP, it logs emails to stdout. Production should integrate SMTP/SendGrid/SES.
func (*Service) ResetPassword ¶
ResetPassword changes the password using a reset token.
func (*Service) SendMagicLink ¶
SendMagicLink creates a one-time login token and "sends" an email.
func (*Service) SendPasswordResetEmail ¶
SendPasswordResetEmail creates a reset token and "sends" an email.
func (*Service) ValidateMagicLink ¶
ValidateMagicLink validates a magic link token and returns the user ID.
Click to show internal directories.
Click to hide internal directories.