gotwilio icon indicating copy to clipboard operation
gotwilio copied to clipboard

Unable to install package

Open liannarnold opened this issue 1 year ago • 1 comments

I get an error while running go get github.com/sfreiberg/gotwilio.

The error is: # github.com/sfreiberg/gotwilio ../github.com/sfreiberg/gotwilio/access_token.go:91:7: undefined: jwt.StandardClaims ../github.com/sfreiberg/gotwilio/access_token.go:104:53: cannot use claims (variable of type *twilioClaims) as jwt.Claims value in argument to jwt.NewWithClaims: *twilioClaims does not implement jwt.Claims (missing method GetAudience) ../github.com/sfreiberg/gotwilio/access_token.go:119:6: undefined: jwt.StandardClaims

liannarnold avatar Apr 11 '23 16:04 liannarnold

I was able to fix the issue by changing the import statement in access_token.go to github.com/dgrijalva/jwt-go. I saw there was a Pull Request merged in that changed this to "github.com/golang-jwt/jwt", but that library doesn't have the jwt.StandardClaims function.

Created a Pull Request to change the import statement back

liannarnold avatar Apr 11 '23 18:04 liannarnold