Sharing a session between two applications (within the same domain) no longer works
Hi,
I have two Laravel applications within the same domain. The two applications have two different subdomains. They use the same database and also the same session. This worked fine until recently.
Now I have a new domain. I converted both applications to the new domain. The problem is that the session no longer works between the applications.
The following settings are exactly the same in both applications: .env file: APP_KEY (same base64 key) .env file: SESSION_COOKIE (same name) config/session.php: domain ('domain' => '.newdomain.com')
I have tried with both cookie session and database session. The goal is that the user does not have to log in again between the two applications. But now one application will overwrite the session of another. As a result, the user has to log in again and again when switching between the two apps.
As said, it worked fine before. But not anymore. What am I missing?
Please or to participate in this conversation.