🐛 fixes a bug not using the JWT Key correctly

This commit is contained in:
2024-01-21 16:06:36 +01:00
parent f4b6197728
commit 7df43f2cf3
2 changed files with 19 additions and 3 deletions

View File

@ -23,7 +23,8 @@ func Authenticate() gin.HandlerFunc {
if _, ok := token.Method.(*jwt.SigningMethodHMAC); !ok {
return nil, fmt.Errorf("unexpected signing method")
}
return config.GlobalConfig.JwtKey, nil
jwtKeyBytes := []byte(config.GlobalConfig.JwtKey)
return jwtKeyBytes, nil
})
if err != nil {