Why getKey doesn't get called?
See original GitHub issueIf jwt.verify is called asynchronous, secretOrPublicKey can be a function that should fetch the secret or public key
I have following function:
const client = jwksClient({
jwksUri: `${process.env.AUTH0_DOMAIN}/.well-known/jwks.json`
});
const getKey = (header, cb) => {
client.getSigningKey(header.kid, (err, key) => {
var signingKey = key.publicKey || key.rsaPublicKey;
cb(null, signingKey);
});
};
const result = new Promise((resolve, reject) => {
jwt.verify(token, getKey, options, (err, decoded) => {
if (err) {
console.log("token verification failed:", err.message);
reject(err);
} else {
resolve(decoded);
}
});
});
Any idea why getKey
doesn’t get called?
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:7 (4 by maintainers)
Top Results From Across the Web
GetKeyUp does not get called sometimes. - Unity Answers
Hello Community. My problem is that sometimes the GetKeyUp does not get called! My Code: void Update(); {; if (Input.GetKeyDown(KeyCode.
Read more >C# Unity GetKeyDown() not being detected properly
GetKeyDown() only returns true for the single Update call made as soon as the key changes state. Because FixedUpdate runs at a regular...
Read more >Scripting API: Input.GetKey - Unity - Manual
Returns true while the user holds down the key identified by name . GetKey will report the status of the named key. This...
Read more >IDBIndex.getKey() - Web APIs - MDN Web Docs
openCursor except that the returned records are sorted based on the index, not the primary key. myIndex.getKey('Bungle') is then used to ...
Read more >Input.GetKeyDown need to press button more than once to work
You need to call this function from the Update function, since the state gets reset each frame. It will not return true until...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I have the same problem, that
getKey
isn’t called. I tried adding variousconsole.log
statements, but the implementation forgetKey
is not executed. I also tried version 8.3.0 and 8.4.0.I downloaded your project and used one jwks url and it worked fine 🤔 If you don’t have a jwks uri you can easily remove the code calling
client.getSigningKey
and return a hardcoded secret, you will see it is called.