Encrypt totp secrets

This commit is contained in:
Melody Becker 2025-03-31 23:23:25 +02:00
parent c59b0c8340
commit 0fa8f4f7be
Signed by: mstar
SSH key fingerprint: SHA256:vkXfS9FG2pVNVfvDrzd1VW9n8VJzqqdKQGljxxX8uK8
2 changed files with 35 additions and 3 deletions

View file

@ -10,5 +10,18 @@ var (
ErrInvalidCombination = errors.New("invalid account and token combination")
ErrProcessTimeout = errors.New("authentication process timed out")
// A user may not login, for whatever reason
ErrCantLogin = errors.New("user can't login")
ErrCantLogin = errors.New("user can't login")
ErrDecryptionFailure = errors.New("failed to decrypt content")
)
type CombinedError struct {
Err1, Err2 error
}
func (c *CombinedError) Is(e error) bool {
return errors.Is(e, c.Err1) || errors.Is(e, c.Err2)
}
func (c *CombinedError) Error() string {
return c.Err1.Error() + " + " + c.Err2.Error()
}