I'm starting to use this library https://github.com/lexik/LexikJWTAuthenticationBundle
When I use the command php bin/console lexik:jwt:generate-keypair
, the console shows this error
In GenerateKeyPairCommand.php line 151:
error:02001003:system library:fopen:No such process
I have Symfony 5 with PHP 7.1 and Openssl is running.
You can override this command by manual action like in oldest version:
mkdir -p config/jwt
openssl genpkey -out config/jwt/private.pem -aes256 -algorithm rsa -pkeyopt rsa_keygen_bits:4096
openssl pkey -in config/jwt/private.pem -out config/jwt/public.pem -pubout
Try this.
just go to tags then go to the previous version where you will get these commend lines
$ mkdir -p app/var/jwt
$ openssl genrsa -out app/var/jwt/private.pem -aes256 4096
$ openssl rsa -pubout -in app/var/jwt/private.pem -out app/var/jwt/public.pem
You can update the directories as you see fits, and as you already know it's always better to not commit those generated keys to your repository.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With