Recover PAYLOAD_SECRET_KEY?

default discord avatar
Tinouti
3 weeks ago
2

So I deleted my .env file by mistake. 🤦‍♂️



Is there a way to recover the secret key somehow, or do I have to reinstall Payload with a fresh key and migrate my data over?



Oh actually I had misunderstood what the secret key was used for. After doing some more reading of the documentation (

https://payloadcms.com/docs/getting-started/installation#server

), sounds like it's only used to generate the user tokens (JWT).


So I assume that the only downside of changing the secret key would be invalidating current user tokens. 👍

  • default discord avatar
    allanc
    3 weeks ago
    So I assume that the only downside of changing the secret key would be invalidating current user tokens. 👍

    this is what i found too when i had to change payload_secret

Open the post
Continue the discussion in Discord
Like what we're doing?
Star us on GitHub!

Star

Connect with the Payload Community on Discord

Discord

online

Can't find what you're looking for?

Get help straight from the Payload team with an Enterprise License.