modified: begushiybashkir/bbvue/src/stores/auth.js

modified:   begushiybashkir/bbvue/src/stores/user.js
	modified:   begushiybashkir/bbvue/src/views/Login.vue
	modified:   begushiybashkir/bbvue/src/views/Register.vue
	modified:   serv_nginx/api_bb/.env
	modified:   serv_nginx/api_bb/cmd/main.go
	modified:   serv_nginx/api_bb/internal/handlers/auth.go
	modified:   serv_nginx/api_bb/internal/handlers/handlers.go
	modified:   serv_nginx/api_bb/internal/models/user.go
	modified:   serv_nginx/api_bb/internal/routes/routes.go
	modified:   serv_nginx/api_bb/internal/service/auth_service.go
	modified:   serv_nginx/api_bb/pkg/logger/logger.go
delete hash pass from auth_service
it is fix the not loging becouse dowble hash password was
password hash is in middlewares

	modified:   begushiybashkir/bbvue/src/stores/auth.js
	modified:   begushiybashkir/bbvue/src/stores/user.js
	modified:   begushiybashkir/bbvue/src/views/Login.vue
	modified:   begushiybashkir/bbvue/src/views/Register.vue
	modified:   serv_nginx/api_bb/.env
	modified:   serv_nginx/api_bb/cmd/main.go
	modified:   serv_nginx/api_bb/internal/handlers/auth.go
	modified:   serv_nginx/api_bb/internal/handlers/handlers.go
	modified:   serv_nginx/api_bb/internal/models/user.go
	modified:   serv_nginx/api_bb/internal/routes/routes.go
	modified:   serv_nginx/api_bb/internal/service/auth_service.go
	modified:   serv_nginx/api_bb/pkg/logger/logger.go
delete hash password from auth_server
becouse is dowble hash was
second hash is beforeCreatehash in User struct
This commit is contained in:
2025-10-12 05:05:40 +05:00
parent ce433e6187
commit fd9be2199c
12 changed files with 264 additions and 114 deletions
@@ -6,6 +6,7 @@ import (
"encoding/json"
"io"
"net/http"
"strings"
"time"
"api_bb/internal/models"
@@ -201,6 +202,10 @@ func (h *AuthHandler) Login(w http.ResponseWriter, r *http.Request) {
return
}
req.Email = strings.TrimSpace(req.Email)
req.Password = strings.TrimSpace(req.Password)
// Валидация
if req.Email == "" || req.Password == "" {
h.logger.Warn("validation failed",