Open yongDataScince opened 3 years ago
`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
SigningMethodES256 ==> SigningMethodHS256
`token := jwt.NewWithClaims(jwt.SigningMethodES256, &tokenClaims{ jwt.StandardClaims { ExpiresAt: time.Now().Add(tockenTTL).Unix(), IssuedAt: time.Now().Unix(), }, user.ID, })
Originally posted by @yongDataScince in https://github.com/dgrijalva/jwt-go/issues/65#issuecomment-776227353