Hi,
I use ReactJs in frontend and Symfony 5 on backend.
Now I have working login but I need share session to my websocket server. I Want store session to database to table session. https://symfony.com/doc/current/session/database.html
security:yaml
security:
firewalls:
login:
pattern: ^/api/login
stateless: true
anonymous: true
json_login:
check_path: /api/login_check
success_handler: lexik_jwt_authentication.handler.authentication_success
failure_handler: lexik_jwt_authentication.handler.authentication_failure
routes.yaml
api_login_check:
path: /api/login_check
services.yaml - I register PDO session handler and expect that session will be store to database
services:
session.handler.pdo:
class: Symfony\Component\HttpFoundation\Session\Storage\Handler\PdoSessionHandler
arguments:
- !service { class: PDO, factory: ['@database_connection', 'getWrappedConnection'] }
- { lock_mode: 0 }
framework.yaml
framework:
secret: '%env(APP_SECRET)%'
session:
handler_id: 'session.handler.pdo'
When I login to appliacation now, session table in database is still empty. Do I something wrong?
Hi,
I use ReactJs in frontend and Symfony 5 on backend.
Now I have working login but I need share session to my websocket server. I Want store session to database to table session. https://symfony.com/doc/current/session/database.html
security:yaml
routes.yaml
services.yaml - I register PDO session handler and expect that session will be store to database
framework.yaml
When I login to appliacation now, session table in database is still empty. Do I something wrong?