Replies: 1 comment 2 replies
-
Please elaborate, why would it be necessary? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
First of all thanks for this great library! I've been using it a lot lately and stumbled over a small feature I'm missing.
I'm missing an option to allow exporting of private keys in the browser runtime. I know that it's often not a good idea to export private keys, but for keys which are used for signing this is necessary. There are also certain use cases in which you would want to extract the key to use it elsewhere.
My suggestion is to add another option to
generateSecret
andgenerateKeyPair
to allow exporting. This option should be disabled by default and can be ignored on Node, because (in my understanding) all Node KeyObjects are exportable.I'm currently using the web crypto api directly to create an exportable key pair. This works, but I would really love to see an option for this directly in jose as it's one of the core aspects of a key if it's exportable or not.
I would love to hear your opinion about this or to open a PR for this feature.
Beta Was this translation helpful? Give feedback.
All reactions