go-chi / jwtauth

JWT authentication middleware for Go HTTP services
MIT License
541 stars 91 forks source link

go get github.com/go-chi/jwtauth fails #56

Closed ghost closed 3 years ago

ghost commented 3 years ago

I tried this on a couple of different machines (Linux and macOS) and both fail with this error:

go get github.com/go-chi/jwtauth
cannot find package "github.com/decred/dcrd/dcrec/secp256k1/v3" in any of:
    /usr/local/Cellar/go/1.15.8/libexec/src/github.com/decred/dcrd/dcrec/secp256k1/v3 (from $GOROOT)
    /Users/saeedzab/go/src/github.com/decred/dcrd/dcrec/secp256k1/v3 (from $GOPATH)

Is this a known issue?

ghost commented 3 years ago

I had to turn on GO111MODULE:

export GO111MODULE=on
go get github.com/lestrrat-go/jwx/cmd/jwx

go: downloading github.com/lestrrat-go/jwx/cmd/jwx v0.0.0-20210219054421-9cd49120943c
go: downloading github.com/lestrrat-go/jwx v1.1.2
go: github.com/lestrrat-go/jwx/cmd/jwx upgrade => v0.0.0-20210219054421-9cd49120943c
go: downloading github.com/lestrrat-go/jwx v1.1.1-0.20210204233036-9593b54afe33
go: downloading github.com/urfave/cli/v2 v2.3.0
go: downloading golang.org/x/crypto v0.0.0-20201217014255-9d1352758620
go: downloading github.com/lestrrat-go/pdebug/v3 v3.0.1
go: downloading github.com/lestrrat-go/httpcc v1.0.0
go: downloading github.com/lestrrat-go/iter v1.0.0
go: downloading github.com/goccy/go-json v0.3.5
go: downloading github.com/lestrrat-go/option v1.0.0
go: downloading github.com/lestrrat-go/backoff/v2 v2.0.7

Or to be more precise:

go get github.com/go-chi/jwtauth
go: downloading github.com/go-chi/jwtauth v1.2.0
go: github.com/go-chi/jwtauth upgrade => v1.2.0
go: downloading github.com/lestrrat-go/jwx v1.1.0
go: downloading golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad