Strapi Admin Reset Password - CLI reset

Im looking to reset my admin password on my Server connected to Strapi. Everytime I try to sign in with the email address it gave me an error(Previously when i started the server it only asked for username so im confused how it changed) This is the Error I currently recieve everytime I enter my password:

error Error: secretOrPrivateKey must have a value

Theres no 4/500 Error either thats the only thing it says. If i put the wrong password on purpose then I get an 400 Error.

So is there a way to do an password Reset through the CLI? That way it also gets associated with MongoDB? I really need this problem fixed and im not sure how it arised as I had my password saved so I never had this problem before. Thanks to anyone that can help!

Hello!

  • The server should not be running
  • You need to be on the latest release (v3.2.4 at time of writing)

1 Like

Username was accepted in 3.0.* versions. In 3.1.* it was replaced with email.

You migrated from 3.0.x to 3.1.x without completing all the steps from the migration guide.
See: Migration guide from 3.0.x to 3.1.x

Your problem is in the #2 section. The error occurs because you are missing the ADMIN_JWT_SECRET

2 Likes