diff --git a/controller/auth.go b/controller/auth.go index e86d823..3f5472b 100644 --- a/controller/auth.go +++ b/controller/auth.go @@ -13,6 +13,7 @@ import ( "github.com/kataras/jwt" "go.uber.org/zap" "golang.org/x/crypto/bcrypt" + "strings" "time" ) @@ -201,6 +202,8 @@ func (a *AuthController) PostPubkeyChallenge() { return } + r.Pubkey = strings.ToLower(r.Pubkey) + // Retrieve the account for the given email. account := model.Key{} if err := db.Get().Where("pubkey = ?", r.Pubkey).First(&account).Error; err != nil {