GithubHelp home page GithubHelp logo

hapi v17 support about node-jwks-rsa HOT 9 CLOSED

auth0 avatar auth0 commented on June 1, 2024
hapi v17 support

from node-jwks-rsa.

Comments (9)

diegobfernandez avatar diegobfernandez commented on June 1, 2024 3

It seems #38 fix it. Just need to merge it now. This is the only thing holding me back to publish my v17 upgrade.

from node-jwks-rsa.

kajlund avatar kajlund commented on June 1, 2024

I would need this too. Does not seem to be working currently with latest style of hapi-auth-jwt2

from node-jwks-rsa.

dupski avatar dupski commented on June 1, 2024

+1

from node-jwks-rsa.

adematte avatar adematte commented on June 1, 2024

I think #38 is bugged. I submitted a review with what I think is going wrong.

from node-jwks-rsa.

diegobfernandez avatar diegobfernandez commented on June 1, 2024

Now that #38 is merged we have to wait to #44

from node-jwks-rsa.

jl-dos avatar jl-dos commented on June 1, 2024

This was helpful for the complete:true and the different key validation function needed for v17.
https://github.com/auth0/node-jwks-rsa/tree/master/examples/hapi-demo

from node-jwks-rsa.

michalczukm avatar michalczukm commented on June 1, 2024

It works fine but I faced some issues due to lack of documentation, I described the example usage in SO answer: https://stackoverflow.com/a/51995573/2029818.

Maybe its worth to add a example usage for hapi v17? I can do it, but please point me in which file I should add it.

from node-jwks-rsa.

nonniv avatar nonniv commented on June 1, 2024

Hi, when trying the example for Hapi v.17.x.x I get this error:
in ..../node_modules/jwks-rsa/lib/integrations/hapi.js:63
return cb(null, key.publicKey || key.rsaPublicKey, key);

And the function there is:
return function secretProvider(decoded, cb) {
// We cannot find a signing certificate if there is no header (no kid).
if (!decoded || !decoded.header) {
return cb(null, null, null);
}

// Only RS256 is supported.
if (decoded.header.alg !== 'RS256') {
  return cb(null, null, null);
}

client.getSigningKey(decoded.header.kid, function (err, key) {
  if (err) {
    return onError(err, function (newError) {
      return cb(newError, null, null);
    });
  }

  // Provide the key.
  return cb(null, key.publicKey || key.rsaPublicKey, key);
});

};

under the comment Provide the key, cb is not in scope, try'ed to move it and that resulted in some other errors, donΒ΄t now the code to be able to figure it out.

from node-jwks-rsa.

damieng avatar damieng commented on June 1, 2024

This work was complete, I think if the docs need work we should track that on another issue/PR.

from node-jwks-rsa.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.