Strapi upgrade to 4.1.12 and get jwtSecret missing issue

Generate the random secret:

openssl rand -hex 64

Either set is as an environment variable

export JWT_SECRET=<GENERATED>

add it to your .env file:

JWT_SECRET=<GENERATED>

or if you’d like to use custom name, provide it in your config/plugins.js configuration:

module.exports = ({ env }) => ({
  "users-permissions": {
    config: {
      jwtSecret: env('CUSTOM_JWT_SECRET'),
    }
  }
})
2 Likes