Skip to content

Extractable keys#4229

Merged
NSeydoux merged 2 commits intomainfrom
extractable-keys
Mar 25, 2026
Merged

Extractable keys#4229
NSeydoux merged 2 commits intomainfrom
extractable-keys

Conversation

@NSeydoux
Copy link
Copy Markdown
Contributor

This reapplies #4207 by @NoelDeMartin (following copied from the original PR by Noel):

In the core package, a key pair is generated without the extractable parameter and then is exported using exportJWK.

According to the documentation (node, browser), this shouldn't be possible and I was getting a error saying "non-extractable CryptoKey cannot be exported as a JWK". Then I wondered how this ever worked in the first place... Apparently, running this with node doesn't throw an error, but I was using bun which does.

In this case, it seems like the incorrect behaviour is Node's, so we should be using the extractable config. Just to made sure, I verified that my fix works in both runtimes.

@NSeydoux NSeydoux requested a review from a team as a code owner March 25, 2026 12:50
@NSeydoux NSeydoux enabled auto-merge (squash) March 25, 2026 12:51
@NSeydoux NSeydoux merged commit 4038d9b into main Mar 25, 2026
30 of 38 checks passed
@NSeydoux NSeydoux deleted the extractable-keys branch March 25, 2026 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants