jsonwebtoken icon indicating copy to clipboard operation
jsonwebtoken copied to clipboard

Support certificates as public keys

Open qianxi0410 opened this issue 1 year ago • 1 comments

When I use the certificate-private key mode, I have the certificate as the public key, but when I use public key(certificate) parsing, the program keeps telling me that the key format is not correct.

And I just replace the format as follows, and it works fine:

before:

-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----

-----BEGIN PRIVATE KEY-----
...
-----END PRIVATE KEY-----

after:

-----BEGIN PUBLIC KEY-----
...
-----END PUBLIC KEY-----

-----BEGIN PRIVATE KEY-----
...
-----END PRIVATE KEY-----

qianxi0410 avatar Jul 08 '22 04:07 qianxi0410

I have this issue as well. Firebase has the certificate format: https://www.googleapis.com/robot/v1/metadata/x509/[email protected]

jetaggart avatar Aug 12 '22 18:08 jetaggart

Done, may be closed.

Alexey-N-Chernyshov avatar Dec 04 '22 07:12 Alexey-N-Chernyshov