Reading .pem files in convex
Hi, how do I read .pem files through convex, I've tried the .env way, and it didnt work at all.
here's my github repo:
https://github.com/Cyberverse2/squid
GitHub
GitHub - CyberVerse2/squid
Contribute to CyberVerse2/squid development by creating an account on GitHub.
6 Replies
What errors are you seeing when using a pem via environment variable?
This is the errorr:
Uncaught Error: [universal-github-app-jwt] Private Key is in PKCS#1 format, but only PKCS#8 is supported. See https://github.com/gr2m/universal-github-app-jwt#readme
GitHub
GitHub - gr2m/universal-github-app-jwt: Calculate GitHub App bearer...
Calculate GitHub App bearer tokens for Node & modern browsers - gr2m/universal-github-app-jwt
I've tried converting it, still got the same error
Thinking of either storing it in the convex db and how to retrieve it, or to build an api for it
Converting the key should have worked, and getting the same error is surprising. I don't see why storing it in the convex db would be better than an env variable. Can you provide example code i could use to repro? Convex's support for PKCS8 is new so there might still be undiscovered issues.
When i look at when this error would be thrown, it really seems like converting the key should work https://github.com/gr2m/universal-github-app-jwt/blob/1ac050829692806b61c85366f05256fe79ede81f/lib/utils.js#L7
GitHub
universal-github-app-jwt/lib/utils.js at 1ac050829692806b61c85366f0...
Calculate GitHub App bearer tokens for Node & modern browsers - gr2m/universal-github-app-jwt
Ok, Sorry I didn't reply for so long