Compare commits
1 Commits
ml2
...
ffcbff5294
| Author | SHA1 | Date | |
|---|---|---|---|
| ffcbff5294 |
@@ -348,14 +348,6 @@ func (a *authServiceImpl) RegistrationBegin(request models.RegistrationBeginRequ
|
|||||||
a.log.Error(
|
a.log.Error(
|
||||||
"Failed to commit transaction",
|
"Failed to commit transaction",
|
||||||
zap.Error(err))
|
zap.Error(err))
|
||||||
|
|
||||||
redisErr := a.redis.Del(context.TODO(), fmt.Sprintf("email::%s::registration_in_progress", request.Email))
|
|
||||||
if redisErr != nil {
|
|
||||||
a.log.Error(
|
|
||||||
"Failed to delete cooldown redis key while rolling back RegistrationBegin",
|
|
||||||
zap.Error(redisErr.Err()))
|
|
||||||
}
|
|
||||||
|
|
||||||
return false, errs.ErrServerError
|
return false, errs.ErrServerError
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -816,14 +808,6 @@ func (a *authServiceImpl) PasswordResetBegin(request models.PasswordResetBeginRe
|
|||||||
a.log.Error(
|
a.log.Error(
|
||||||
"Failed to commit transaction",
|
"Failed to commit transaction",
|
||||||
zap.Error(err))
|
zap.Error(err))
|
||||||
|
|
||||||
redisErr := a.redis.Del(context.TODO(), fmt.Sprintf("email::%s::reset_cooldown", request.Email))
|
|
||||||
if redisErr != nil {
|
|
||||||
a.log.Error(
|
|
||||||
"Failed to delete cooldown redis key while rolling back PasswordResetBegin",
|
|
||||||
zap.Error(redisErr.Err()))
|
|
||||||
}
|
|
||||||
|
|
||||||
return false, errs.ErrServerError
|
return false, errs.ErrServerError
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -920,7 +904,6 @@ func (a *authServiceImpl) PasswordResetComplete(request models.PasswordResetComp
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME: grab client info
|
|
||||||
session, err = db.TXQueries.CreateSession(db.CTX, database.CreateSessionParams{
|
session, err = db.TXQueries.CreateSession(db.CTX, database.CreateSessionParams{
|
||||||
UserID: user.ID,
|
UserID: user.ID,
|
||||||
Name: utils.NewPointer("First device"),
|
Name: utils.NewPointer("First device"),
|
||||||
@@ -964,7 +947,6 @@ func (a *authServiceImpl) PasswordResetComplete(request models.PasswordResetComp
|
|||||||
return &response, nil
|
return &response, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// XXX: Mechanism for loging out existing sessions currently does not exist
|
|
||||||
func (a *authServiceImpl) ChangePassword(request models.ChangePasswordRequest, uinfo dto.ClientInfo) (bool, error) {
|
func (a *authServiceImpl) ChangePassword(request models.ChangePasswordRequest, uinfo dto.ClientInfo) (bool, error) {
|
||||||
|
|
||||||
var err error
|
var err error
|
||||||
@@ -999,7 +981,7 @@ func (a *authServiceImpl) ChangePassword(request models.ChangePasswordRequest, u
|
|||||||
return false, errs.ErrServerError
|
return false, errs.ErrServerError
|
||||||
}
|
}
|
||||||
|
|
||||||
err = db.TXQueries.UpdateLoginInformationByUsername(db.CTX, database.UpdateLoginInformationByUsernameParams{
|
err = db.TXlessQueries.UpdateLoginInformationByUsername(db.CTX, database.UpdateLoginInformationByUsernameParams{
|
||||||
Username: uinfo.Username,
|
Username: uinfo.Username,
|
||||||
PasswordHash: newPasswordHash,
|
PasswordHash: newPasswordHash,
|
||||||
}); if err != nil {
|
}); if err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user