react-native-pure-jwt icon indicating copy to clipboard operation
react-native-pure-jwt copied to clipboard

RSxxx algorithms doesn't work.

Open pakkibokati2012 opened this issue 5 years ago • 7 comments

The error object says key bytes can only be specified for HMAC signatures. So, please specify a PublicKey or PrivateKey instance.

pakkibokati2012 avatar Aug 09 '19 10:08 pakkibokati2012

What is the algorithm you're trying to use?

zaguiini avatar Aug 09 '19 12:08 zaguiini

RS256

pakkibokati2012 avatar Aug 12 '19 05:08 pakkibokati2012

Then it will not work, the lib doesn't work with RS algorithms yet...

zaguiini avatar Aug 12 '19 09:08 zaguiini

Thanks for prompt reply. I will create a PR if I find a workaround.

pakkibokati2012 avatar Aug 12 '19 11:08 pakkibokati2012

You're welcome. One thing I wondered was to pass the relative path to the .pem (I think), this path being a string, relative to the root of the app, which will be resolved on the native side. What do you think?

zaguiini avatar Aug 12 '19 11:08 zaguiini

Actually I want to use some existing java code without having to reimplement it in javascript for practice. I have not written java code before but few copy pasting of snippets might get the job done. If I succeed I will create a PR.

pakkibokati2012 avatar Aug 14 '19 04:08 pakkibokati2012

How that went @pakkibokati2012? Confident about filling a PR?

zaguiini avatar Sep 13 '19 00:09 zaguiini