Getting errors in building go project which uses github.com/golang-jwt/jwt/v5 library

I am creating an application that uses some libraries which implement golang-jwt/jwt/v5 for authentication. When I compile my project, it downloads dependencies in a vendor folder containing github.com/golang-jwt/jwt/v5 folder as well. When I build the project, I get an error:

github.com/golang-jwt/jwt/v5

vendor/github.com/golang-jwt/jwt/v5/errors_go_other.go:57:13: undefined: any
vendor/github.com/golang-jwt/jwt/v5/errors_go_other.go:60:12: undefined: any
vendor/github.com/golang-jwt/jwt/v5/errors_go_other.go:63:12: undefined: any
make: *** [Makefile:7: build] Error 2

I tried fixing this by declaring “type any = interface{}” in the file and rebuilding it, but this time from the local vendor folder and not downloading it from the GitHub. It builds correctly. But when I run the application, I get an error:

2023-06-02T13:36:39.843Z WARN jwt auth/jwt.go:54 unable to refresh JWKS keys environmental variable OIDC_SERVER_URL is not set Can’t reach the OIDC server to refresh JWKS

Is there any patch for jwt/v5 to solve the above problem? I tried it with different go versions up to go1.20, but I still get the error. Please help me.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.