fix: google provider auth

This commit is contained in:
2026-04-07 13:36:43 +02:00
parent de3f2d1777
commit 2e645f3368
5 changed files with 141 additions and 18 deletions

View File

@@ -11,6 +11,8 @@ import (
"git.ma-al.com/goc_daniel/b2b/app/config"
"git.ma-al.com/goc_daniel/b2b/app/db"
"git.ma-al.com/goc_daniel/b2b/app/model"
"git.ma-al.com/goc_daniel/b2b/app/repos/customerRepo"
roleRepo "git.ma-al.com/goc_daniel/b2b/app/repos/rolesRepo"
"git.ma-al.com/goc_daniel/b2b/app/service/emailService"
constdata "git.ma-al.com/goc_daniel/b2b/app/utils/const_data"
"git.ma-al.com/goc_daniel/b2b/app/utils/responseErrors"
@@ -35,17 +37,21 @@ type JWTClaims struct {
// AuthService handles authentication operations
type AuthService struct {
db *gorm.DB
config *config.AuthConfig
email *emailService.EmailService
db *gorm.DB
config *config.AuthConfig
email *emailService.EmailService
customerRepo customerRepo.UICustomerRepo
roleRepo roleRepo.UIRolesRepo
}
// NewAuthService creates a new AuthService instance
func NewAuthService() *AuthService {
svc := &AuthService{
db: db.Get(),
config: &config.Get().Auth,
email: emailService.NewEmailService(),
db: db.Get(),
config: &config.Get().Auth,
email: emailService.NewEmailService(),
customerRepo: customerRepo.New(),
roleRepo: roleRepo.New(),
}
// Auto-migrate the refresh_tokens table
if svc.db != nil {