fix+feat: añadido crear usuario y separado en componentes los modals

This commit is contained in:
fede committed 2026-06-05 20:29:23 -03:00
1 parent eff116fab0
commit 62ec25b768
14 files changed
+387 -131

No files matched your search

+3 -3
View File
@@ -1,17 +1,17 @@
package jwtutils
import (
"repuestera_back/controllers/auth"
"github.com/golang-jwt/jwt/v5"
)
var JWTSecret = []byte("supersecretkey123456789")
func ValidarJWT(tokenString string) (jwt.MapClaims, error) {
token, err := jwt.Parse(tokenString, func(token *jwt.Token) (interface{}, error) {
if _, ok := token.Method.(*jwt.SigningMethodHMAC); !ok {
return nil, jwt.ErrSignatureInvalid
}
return auth.JWTSecret, nil
return JWTSecret, nil
})
if err != nil {
return nil, err