fix invalid key expecting bytes instead of string

This commit is contained in:
Chris Cromer 2022-07-22 22:19:52 -04:00
parent 4b26d6f0a5
commit ddc3ffe488
Signed by: cromer
GPG Key ID: FA91071797BEEEC2
1 changed files with 1 additions and 1 deletions

View File

@ -24,7 +24,7 @@ func GenerateJWT(email string, username string) (tokenString string, err error)
},
}
token := jwt.NewWithClaims(jwt.SigningMethodHS256, claims)
tokenString, err = token.SignedString(os.Getenv("JWT_SECRET"))
tokenString, err = token.SignedString([]byte(os.Getenv("JWT_SECRET")))
return
}