-
Notifications
You must be signed in to change notification settings - Fork 233
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
jwks-rsa 1.6.0 package breaking code #103
Comments
Hi @firojasha , Encountered the same issue today and after 30 minutes of searching managed to track it down to this commit / line: Sadly there was no mention of this breaking change anywhere nor was there documentation update. Working solution for now is: const getKey = (header, callback) => {
client.getSigningKey(header.kid, (err, key: jwksClient.SigningKey) => {
const signingKey =
(key as jwksClient.CertSigningKey).publicKey ||
(key as jwksClient.RsaSigningKey).rsaPublicKey
callback(null, signingKey)
})
} |
+1 having the same error. Downgrading version for now |
Is there any update on this, please? |
upgraded today from 1.5.0 and facing the same issue. |
experiencing the same issue |
For those encountering this issue, we sincerely apologize for the unexpected breaking change. We are evaluating the best path forward to address this; in the meantime please remain on version 1.5 if you don't need to support private certificates and/or additional agent configurations that was added in v6, or consider the suggested workarounds above. |
Hi all. Considering the time passed since the unintended breaking change, we've released version Now, instead of type-checking the value and accessing either const getKey = (header, callback) => {
client.getSigningKey(header.kid, (err, key: jwksClient.SigningKey) => {
const signingKey = key.getPublicKey()
callback(null, signingKey)
})
} We apologize for any inconvenience that this has caused. |
@lbalmaceda please update readme example at https://github.com/auth0/node-jsonwebtoken#jwtverifytoken-secretorpublickey-options-callback with above too if its the suggested way now |
function getKey(header: any, callback: any) {
client.getSigningKey( header.kid, function (_err, key: jwksClient.SigningKey | undefined) {
const signingKey =
(key as jwksClient.CertSigningKey).publicKey ||
(key as jwksClient.RsaSigningKey).rsaPublicKey
callback(null, signingKey)
})
} |
Hi,
[email protected] is breaking our code with the below error, when we go back to [email protected] we are not seeing the below mentioned issue and application working perfectly,
Please check what is causing to break when install [email protected] package.
src/eso/RebarESOUtils.ts:119:46 - error TS2339: Property 'publicKey' does not exist on type 'SigningKey'.
Property 'publicKey' does not exist on type 'RsaSigningKey'.
119 let signingKey = key.publicKey || key.rsaPublicKey; ~~~~~~~~~
src/eso/RebarESOUtils.ts:119:63 - error TS2339: Property 'rsaPublicKey' does not exist on type 'SigningKey'.
Property 'rsaPublicKey' does not exist on type 'CertSigningKey'.
119 let signingKey = key.publicKey || key.rsaPublicKey;
Regards,
Firoj Shaik
The text was updated successfully, but these errors were encountered: