An error occurred while trying to encode the JWT token. Please verify your configuration (private key/passphrase)

I am getting this request every time. Does someone know how to solve it.

I generated my keys using:

openssl genrsa -out config/jwt/private.pem -aes256 512

openssl rsa -in config/jwt/private.pem -pubout -out config/jwt/public.pem

My keys are in the config/jwt folder

And in my .env.local file I have

JWT_SECRET_KEY=%kernel.project_dir%_config_jwt/private.pem
JWT_PUBLIC_KEY=%kernel.project_dir%_config_jwt/public.pem
JWT_PASSPHRASE=12345

This used to work but now it doesn’t work anymore

Source: Symfony Questions

Was this helpful?

0 / 0

Leave a Reply 0

Your email address will not be published. Required fields are marked *