api-platform / docs

API Platform documentation
https://api-platform.com/docs/
164 stars 1.05k forks source link

Fix command line to generate public and private keys using lexik:jwt:… #1920

Closed Ak1r0 closed 4 months ago

Ak1r0 commented 4 months ago

…generate-keypair

In the doc for JWT Authentication there's this command line to use with the docker install :

docker compose exec php sh -c '
    set -e
    apk add openssl
    php bin/console lexik:jwt:generate-keypair
    setfacl -R -m u:www-data:rX -m u:"$(whoami)":rwX config/jwt
    setfacl -dR -m u:www-data:rX -m u:"$(whoami)":rwX config/jwt

The command line use apk add openssl but apk is not found in the container.

I changed it for apt-get install openssl and it works perfectly :)

Cheers

dunglas commented 4 months ago

Good catch, we recently switched from Alpine to Debian, that's why this change is needed.