Symfony – keep session (database storage) after multi redirect

When my users log in, a session is created.

While browsing, they are forced to be redirected several times to

When the session is stored in a flat file, no problem, the session is found, the user is logged in.

When I store the session in the database, the user is recognized and the session follows its navigation well.
By cons, when I redirect it to, the Symfony session no longer appears in the browser console and the user is no longer recognized.

My code to save the session in the database:


            - '%env(DATABASE_URL)%'


        #handler_id: null
        #name: ACSESSID
        handler_id: SymfonyComponentHttpFoundationSessionStorageHandlerPdoSessionHandler
        gc_maxlifetime: 3600
        cookie_secure: auto
        cookie_samesite: lax

Source: Symfony Questions

Was this helpful?

0 / 0

Leave a Reply 0

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