Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot verify JWT at all?? #177

Closed
deepflame opened this issue Nov 29, 2016 · 5 comments
Closed

Cannot verify JWT at all?? #177

deepflame opened this issue Nov 29, 2016 · 5 comments

Comments

@deepflame
Copy link

Hi everyone,

we are evaluating Auth0 for our service and have problems to get going.
We can verify the token we get on jwt.io as you can see here:

screen shot 2016-11-29 at 16 28 55

However in the console I get the following:
screen shot 2016-11-29 at 16 27 02

I copied the values from the console into the webpage. So I am pretty confident that they are actually the same.

What can be the problem? Should I reinstall Ruby after my upgrade to macOS Sierra?

@excpt
Copy link
Member

excpt commented Nov 30, 2016

Can you please provide your Ruby version and jwt version you are using?

After my upgrade to macOS Sierra I had to re-install all my brew packages including rbenv.

@deepflame
Copy link
Author

Sure!

Ruby 2.3.1
JWT 1.5.6

Yeah, thought that OpenSSL might be messed up now or something. What was the problem you were having?

@deepflame
Copy link
Author

Yey, I got it to work like this:

JWT.decode(token, JWT.base64url_decode(secret), true)

Was trying it before with Base64.decode64 but this did not work.
Happy it works with the provided function :)

@excpt
Copy link
Member

excpt commented Nov 30, 2016

Ah, ok. The password was the issue.

The password isn't base64 encoded when creating a token with this gem. It needs to be plain text.

@deepflame
Copy link
Author

This is actually a problem with Auth0's quickstart documentation. Hope they update it soon :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants