With a simple configuration setting you can allow only cetain user roles to log in on your page without doing this check by yourself.
In this post I describe a simple way of generating a simple JWT based API only with the help of the default symfony tools. Ok, two exception – I will use doctrine/dbal to access the database and a JWT library to generate and validate the JWT. At the end you will have a login endpoint where you send your credentials to. From there you will get back a JWT token you can use for the following requests to the API.
Running symfony apps on Windows 10 could be a real pain because it is extremely slow. To solve this issue you can run your symfony app on WSL 2. Like written above symfony apps are extremely slow when you try to run then on a Windows 10 system. Especially when you run them in the dev environment while development. It doesn’t matter how fast your system is. Loading times for one simple single request could be easily around one till 20 seconds.