key is of invalid type, []byte('key') - not working. Hello from 2021...
Author: yongDataScinceCreated Feb 9, 2021Updated Sep 23, 2021
`token := jwt.NewWithClaims(jwt.SigningMethodES256, &tokenClaims{ jwt.StandardClaims { ExpiresAt: time.Now().Add(tockenTTL).Unix(), IssuedAt: time.Now().Unix(), }, user.ID, })
signKey := []byte("kdnjsndjnd*jdnj212md")
tkn, err := token.SignedString(signKey)
return tkn, err`Originally posted by @yongDataScince in https://github.com/dgrijalva/jwt-go/issues/65#issuecomment-776227353
Source: dgrijalva/jwt-go