-
Notifications
You must be signed in to change notification settings - Fork 252
How to reference public key in knock.rb (config.token_public_key) ? #148
Comments
I figured this out .. for anyone else stumped by this, here is my solution: In secrets.yml:
In knock.rb:
|
@jessecravens thanks so much for tracking this down... hours lost here. I'm going to work up a PR to update the initializer with some comments |
Thanks @jessecravens, just saved me from setting the keyboard on fire here ;) |
@jessecravens, did you need to configure anything else in
I used jwt.io debugger to make sure everything was fine, and it is, signature is validated, therefore I guess the problem comes from my app configuration |
Thank you so much @jessecravens. Spent hours trying to figure out what the problem was... @Sashkan make sure you change this line in the knock.rb by Auth0 algorithm toggle is not working ATM so make sure that you use RS256 by default Should work fine after that 👍 |
Worth noting that #124 does this same thing, but via |
Thanks @jessecravens! This was super frustrating, you're a life saver! |
Thanks @jessecravens! Your solution saved me a ton of headache! |
@Sashkan did you make progress? I'm stuck with the same piece, though this does give me back the PEM I need... |
How is this not part of the core README? It's a breaking change from prior behavior with Auth0... |
@jessecravens YOU ARE A HERO!!!! |
I also encountered the same problem as described above: I think the point that is missing in the description of
I think it would be better if knock was accepting a String and creates an OpenSSL::PKey from it internally. |
My man, thank you! This one was brutal. |
@jessecravens I know this is old, but thank you so much! I was missing the |
I am trying to properly configure an app that uses auth0js v8.2.0 to use RS256. Since Auth0 is returning a token signed with RS256. I've debugged it down to here: jwt/ruby-jwt#115
One theory that I have is that my reference in
config.token_public_key
is improper.I've tried every which way I can think of, but this method
public_key.verify(OpenSSL::Digest.new(algorithm.sub('RS', 'sha')), signature, signing_input)
continues to raise a no method error:Does anyone have a working example?
Or is there something more fundamental that I am missing here?
The text was updated successfully, but these errors were encountered: