Auth0 Home Blog Docs

Auth0 github sample code not working

go
#1

Hello,

Should this sample code from auth0 still work? It is 2+ years old:

auth0-blog golang sample

Downloading the code, setting up the API and all I get in the terminal is:

::1 - - [03/Feb/2019:15:58:19 -0500] "GET / HTTP/1.1" 200 906
::1 - - [03/Feb/2019:15:58:20 -0500] "GET /static/js/auth0-variables.js HTTP/1.1" 200 174
::1 - - [03/Feb/2019:15:58:20 -0500] "GET /static/js/app.jsx HTTP/1.1" 200 4574
algorithm is invalid
Token is not valid: <nil>

If I try HS256 for grins I get “algorithm not supported”.

What am I missing?

JB

#2

I see the problem with RS256, the github repo source is not setup for it…

Note that the HS256 code in that repo doesn’t work either…

You can delete this, I can’t :wink:

#4

Thanks a lot @omortis!

Sorry for the inconvenience! I’ll report it to appropriate team and see what can be done here!

Thank you a lot for reporting it!

1 Like
#6

@konrad.sopala I was able to get the RS256 style JWT to work quite easily so all is well, I think that sample code just needs a little updating. It also needs some CORS :wink:

I’d be happy to help.

#7

Perfect! Let me get back to you once I have some info back from repo maintainer then!