I don't need to use sessions in my rest(stateless) api and if I turn off them, it's causing an error.
However, if you have the following configuration, Symfony will store the session data in files in the cache directory %kernel. cache_dir%/sessions . This means that when you clear the cache, any current sessions will also be deleted: YAML.
Symfony provides a session object and several utilities that you can use to store information about the user between requests.
You may try using stateless
in
security.yml
security:
firewalls:
main:
stateless: true
Read Doc
Hope it's what you are looking for.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With