Repeat login for Wordpress Multisite

I have a bedrock installation for a Wordpress Multisite. In the Multisite i currently use 2 different domains, example:

When I switch between the two different sites, Wordpress keeps asking me to login every single time i switch. Now i assume the problem is that the sites are different domains and the cookie is being set every time for that domain only.

Is there a solution so that I can switch between the different sites freely without having to login every single time.

I wonder if the domain you have set for each site is somehow misconfigured. You can try the following to automatically set the domain WordPress should use based on the hostname the site is accessed from:

In your application.php file find:

Config::define('WP_HOME', env('WP_HOME'));
Config::define('WP_SITEURL', env('WP_SITEURL'));

Replace with:

Config::define( 'WP_HOME', 'https://' . $_SERVER['HTTP_HOST']);
Config::define( 'WP_SITEURL', 'https://' . $_SERVER['HTTP_HOST']);

That might solve the issue, as it tells WordPress to use the domain the site is accessed from, which should also influence how the cookies are set. For more info on multisite setup with Bedrock see this article.