Versions in this module Expand all Collapse all v1 v1.0.0 Mar 21, 2026 Changes in this version + type BackupCodeService struct + Count int + PasswordService rootservices.PasswordService + func NewBackupCodeService(count int, passwordService rootservices.PasswordService) *BackupCodeService + func (s *BackupCodeService) Generate() ([]string, error) + func (s *BackupCodeService) HashCodes(codes []string) ([]string, error) + func (s *BackupCodeService) VerifyAndConsume(hashedCodes []string, code string) ([]string, bool) + type TOTPService struct + Digits int + PeriodSeconds int + func NewTOTPService(digits, periodSeconds int) *TOTPService + func (s *TOTPService) BuildURI(secret, issuer, email string) string + func (s *TOTPService) GenerateCode(secret string, t time.Time) (string, error) + func (s *TOTPService) GenerateSecret() (string, error) + func (s *TOTPService) ValidateCode(secret, code string, t time.Time) bool