# Golang SDK Quick Start Example: dependencies issue

**URL:** <https://community.auth0.com/t/golang-sdk-quick-start-example-dependencies-issue/71932>\
**Category:** Get Help\
**Tags:** golang, sdk, go, jwt, api\
**Created:** [October 24, 2021, 11:55am UTC](https://community.auth0.com/t/golang-sdk-quick-start-example-dependencies-issue/71932 "2021-10-24T11:55:54Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![dskuratovich](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dskuratovich/32/32552_2.png) [@dskuratovich](https://community.auth0.com/u/dskuratovich)\
**Post date:** [October 24, 2021, 11:55am UTC](https://community.auth0.com/t/golang-sdk-quick-start-example-dependencies-issue/71932/1 "2021-10-24T11:55:54Z")

</div>

Hey everyone!  
The second day I try to get this article working

> **[Auth0 Go API SDK Quickstarts: Authorization](https://auth0.com/docs/quickstart/backend/golang/01-authorization)**
>
> This tutorial demonstrates how to add authorization to a Go API.

The issue I face here is that once I try the code given in the example I see the following message:

```auto
go: finding module for package github.com/auth0/go-jwt-middleware/validate/jwt-go
github.com/{MY_MODULE_PATH}/apiserver imports
	github.com/auth0/go-jwt-middleware/validate/jwt-go: module github.com/auth0/go-jwt-middleware@latest found (v1.0.1), but does not contain package github.com/auth0/go-jwt-middleware/validate/jwt-go

```

And because it couldn’t find needed dependencies I can’t even compile the code.

The internet does have such examples but all those ones are built on top of such as old packages for golang, so the official doc says that I don’t need to use them.

Does anyone have a working example of jwt auth mechanism for golang? Or someone knows how to solve that kind of issue?

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [October 25, 2021, 7:28am UTC](https://community.auth0.com/t/golang-sdk-quick-start-example-dependencies-issue/71932/2 "2021-10-25T07:28:52Z")

</div>

Hey there!

Can you raise it as a GitHub issue in the quickstart repo so we can get that addressed by the quickstart maintainers? Once you have a link to it you can share it with us here so we can ping them. Thank you!

---

<div class="post-metadata">

**Author:** ![Nick16](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nick16/32/33226_2.png) [@Nick16](https://community.auth0.com/u/Nick16)\
**Post date:** [February 12, 2022, 7:48pm UTC](https://community.auth0.com/t/golang-sdk-quick-start-example-dependencies-issue/71932/3 "2022-02-12T19:48:06Z")

</div>

@dskuratovich I’m also having similar issues with trying to find a valid and working golang repo that uses RS256 as the signing algorithm for auth0 as middleware. Have you figured this out?

If you change the algorithm for your app to use HS256, most jwt middle libraries can support it. IE: chi router: [GitHub - go-chi/jwtauth: JWT authentication middleware for Go HTTP services](https://github.com/go-chi/jwtauth#usage)

---

<div class="post-metadata">

**Author:** ![Nick16](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nick16/32/33226_2.png) [@Nick16](https://community.auth0.com/u/Nick16)\
**Post date:** [February 12, 2022, 8:10pm UTC](https://community.auth0.com/t/golang-sdk-quick-start-example-dependencies-issue/71932/4 "2022-02-12T20:10:44Z")

</div>

Nvm. Figured it out. Here’s the most updated golang example with RS256: [Auth0 Go API SDK Quickstarts: Authorization](https://auth0.com/docs/quickstart/backend/golang/01-authorization)  
Github: [auth0-golang-api-samples/01-Authorization-RS256 at master · auth0-samples/auth0-golang-api-samples · GitHub](https://github.com/auth0-samples/auth0-golang-api-samples/tree/master/01-Authorization-RS256)

FWIW, There are way too many outdated or scattered golang examples for auth in too many different repos. Try to archive the ones that aren’t the most up to date.

---

<div class="post-metadata">

**Author:** ![Nick16](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nick16/32/33226_2.png) [@Nick16](https://community.auth0.com/u/Nick16)\
**Post date:** [February 12, 2022, 8:31pm UTC](https://community.auth0.com/t/golang-sdk-quick-start-example-dependencies-issue/71932/5 "2022-02-12T20:31:39Z")

</div>

And more examples here that are listed on the website: [Golang Web Code Samples: API Security in Action](https://auth0.com/developers/hub/code-samples/api/standard-library-golang#what-is-golang)

Example: role based access control, which uses a totally different middleware than whats stated in the previous post above: [api\_standard-library\_golang\_hello-world/main.go at with-go-jwt-middleware-v2 · auth0-developer-hub/api\_standard-library\_golang\_hello-world · GitHub](https://github.com/auth0-developer-hub/api_standard-library_golang_hello-world/blob/with-go-jwt-middleware-v2/main.go)

Different middlewares:

- gopkg.in/square/go-jose.v2
- [github.com/auth0/go-jwt-middleware/v2](http://github.com/auth0/go-jwt-middleware/v2)

Totally fine, but a bit confusing for a developer who just wants to use something out of the box and then there’s a bunch of different tutorials using different packages.

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [February 14, 2022, 8:05am UTC](https://community.auth0.com/t/golang-sdk-quick-start-example-dependencies-issue/71932/6 "2022-02-14T08:05:28Z")

</div>

Perfect! Thanks for sharing it with the rest of community!

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [February 22, 2022, 2:42pm UTC](https://community.auth0.com/t/golang-sdk-quick-start-example-dependencies-issue/71932/7 "2022-02-22T14:42:24Z")

</div>


