Does anyone know why when i try to get a token for my api i get an error : "Notice : Undefined variable key"?

I am using for the first time API platform with symfony (Symfony CLI version : v2.21.2).
I created a USER entity and i am using jwt for authentication. I followed the steps as shown here https://api-platform.com/docs/core/jwt/ but when i post a request :

curl -X POST -H "Content-Type: application/json" http://127.0.0.1:8000/api/login_check -d '{"username":"username1", "password":"password1"}' 

to get a token it fails with the error

Undefined variable key
ErrorException in vendor/lexik/jwt-authentication-bundle/Services/JWSProvider/LcobucciJWSProvider.php (line 22).

Source: Symfony Questions

Was this helpful?

0 / 0

Leave a Reply 0

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