jsonwebtoken
jsonwebtoken copied to clipboard
Support certificates as public keys
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-----
I have this issue as well. Firebase has the certificate format: https://www.googleapis.com/robot/v1/metadata/x509/[email protected]
Done, may be closed.