itslekan
itslekan3mo ago

Server ErrorUncaught Error: Uncaught TypeError: "pkcs8" must be PKCS#8 formatted string

I keep getthing this error when I try to sign in with convex auth "Password"
Server Error
Uncaught Error: Uncaught TypeError: "pkcs8" must be PKCS#8 formatted string
Server Error
Uncaught Error: Uncaught TypeError: "pkcs8" must be PKCS#8 formatted string
Any Ideas
5 Replies
Convex Bot
Convex Bot3mo ago
Thanks for posting in <#1088161997662724167>. Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets. - Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.) - Use search.convex.dev to search Docs, Stack, and Discord all at once. - Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI. - Avoid tagging staff unless specifically instructed. Thank you!
itslekan
itslekanOP3mo ago
it also creates the rows on the database
sshader
sshader3mo ago
This should be a better error message, but it usually means your JWT_PRIVATE_KEY env var isn't the right format -- the start of mine looks something like -----BEGIN PRIVATE KEY----- MIIEvg You can check the value in the Convex dashboard or via npx convex env list.
sshader
sshader3mo ago
Also sometimes re-running the Convex Auth setup script (https://labs.convex.dev/auth/setup#run-the-initialization-command) and saying "yes" when it asks you if it should generate new keys can help
Set Up Convex Auth - Convex Auth
Authentication library for your Convex backend
itslekan
itslekanOP3mo ago
using the cli command fixed everything up thank you