I am developing a Symfony API application with two-step authentication. First step is json_login form with username and password and second step is OTP with SMS service.
After json_login succeeded, json_login authenticator has to create JWT. Because, I use tokens instead of PHP sessions. It's configured in security.yaml file by stateless: true option.
# security.yaml
stateless: true
json_login:
check_path: app_login
username_path: email
password_path: password
It is possible making many different authenticators and firewalls with Symfony Framework. In the first step (json_login), the user is authenticated and is authorized to access the whole system. However, the user must have access to the entire system after the OTP step. Which method can I use for two-factor authentication?