fix: update authorizer-react + oauth callback

This commit is contained in:
Lakhan Samani
2021-08-10 22:20:24 +05:30
parent b9872b5aac
commit 5c3a5000cd
6 changed files with 1453 additions and 1559 deletions

View File

@@ -18,15 +18,15 @@ func ResetPassword(ctx context.Context, params model.ResetPasswordInput) (*model
return res, fmt.Errorf(`basic authentication is disabled for this instance`)
}
if params.Password != params.ConfirmPassword {
return res, fmt.Errorf(`passwords don't match`)
}
_, err := db.Mgr.GetVerificationByToken(params.Token)
if err != nil {
return res, fmt.Errorf(`invalid token`)
}
if params.Password != params.ConfirmPassword {
return res, fmt.Errorf(`passwords don't match`)
}
// verify if token exists in db
claim, err := utils.VerifyVerificationToken(params.Token)
if err != nil {