-
-
Notifications
You must be signed in to change notification settings - Fork 393
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
isKeyObject check fails in Bun #623
Comments
This is happening because The problem at the moment is that Bun, from my POV at least, doesn't use the correct target of a dependency which is being loaded through its CJS and node compatibility modes. I suggest you bring this up with Bun as well, you're not the first one to have this issue. If I have the time in the coming weeks/months I will try and ensure that the entire Now even if Bun did load the correct |
This should really be fixed on Bun's end and not something @panva should have to spend time dealing with @cirospaciari is almost done with KeyObject and that might help with this particular case |
@Jarred-Sumner Thank you for the response, filling in KeyObject won't help on its own so long as Bun doesn't load the "require" target of jose when |
So it's either a) have Bun use the correct require target over others when running a CJS module written for node and fill in crypto APIs such as KeyObject (there could be others) or b) I take the time to update the codebase to handle both KeyObject or CryptoKey coming back from jose |
This attempts to work around: - missing Node.js APIs in Bun - Bun's bugs in url.parse(..., true) - Bun loading `jose`'s bun target instead of the require one It is not possible to run openid-client's test suite due to other Bun Node.js compatibility bugs which is why this is "experimental" Refs #622 Refs #623
This attempts to work around: - missing Node.js APIs in Bun - Bun's bugs in url.parse(..., true) - Bun loading `jose`'s bun target instead of the require one It is not possible to run openid-client's test suite due to other Bun Node.js compatibility bugs which is why this is "experimental" Refs #622 Refs #623
This attempts to work around: - missing Node.js APIs in Bun - Bun's bugs in url.parse(..., true) - Bun loading `jose`'s bun target instead of the require one It is not possible to run openid-client's test suite due to other Bun Node.js compatibility bugs which is why this is "experimental" Refs #622 Refs #623
I've released https://github.com/panva/node-openid-client/releases/tag/v5.6.0 This attempts to work around:
It is not possible to run openid-client's test suite due to other Bun Node.js compatibility bugs which is why this is "experimental" and this for now remains a Node.js only module. Please let me know if you encounter any new issues when running openid-client in Bun. |
Hi,
I am using
bun
as runtime to authenticate against an OP. The authentication process breaks on callback and I get the'what?!'
exception. After some debugging it looks like that
isKeyObject
is failing because the keykeyObject
is notcrypto.KeyObject
butcrypto.CryptoKey
!! I think this is a specific tobun
.After I comment
keystore.js->239-242
everything works. Any advice?Debug information:
reference:
https://github.com/panva/node-openid-client/blob/0f7d3b4f03c799fa74c480e7ee9d32f33344f9df/lib/helpers/is_key_object.js#L4C1-L4C1
https://github.com/panva/node-openid-client/blob/0f7d3b4f03c799fa74c480e7ee9d32f33344f9df/lib/helpers/keystore.js#L239C13-L239C13
The text was updated successfully, but these errors were encountered: