I have an online application which has been running for couple of years
Codeigniter 3.1.11, PHP 7.2
I have added an online feature for clients so they can use it on their website by using an iframe
<iframe src="https://www.mywebsite.com/client/login" allowfullscreen="" frameborder="0" id="fileframe"></iframe>
Everything works fine on Windows platform or android OS, but under MacOS it seems that session values are lost when the page is redirected
redirect('client/index', 'refresh');
If I display the view directly then the session values are kept, but unfortunately, I have to use the redirect method
$this->load->view('client/index', $this->data);
Here is the config part which might be useful to know
$config['sess_driver'] = 'files';
$config['sess_cookie_name'] = 'ci_session';
$config['sess_expiration'] = 7200;
$config['sess_save_path'] = NULL;
$config['sess_match_ip'] = FALSE;
$config['sess_time_to_update'] = 300;
$config['sess_regenerate_destroy'] = FALSE;
$config['cookie_prefix'] = '';
$config['cookie_domain'] = '';
$config['cookie_path'] = '/; SameSite=None';
$config['cookie_secure'] = TRUE;
$config['cookie_httponly'] = FALSE;
And here is what session looks like after login and before the redirect page
Array
(
[__ci_last_regenerate] => 1628374247
[logged_in] => 1
[csid] => 16196
[csname] => customer
[clname] => client
[clid] => 115
)
And this is what the session after the redirect page
Array
(
[__ci_last_regenerate] => 1628374247
[logged_in] =>
)
When a page is loaded, there will be validation on some of the session values, once I try to login using Mac Pro or IPhone with both Safari or Chrome, it redirects back to the login page as the session values already lost. As I mentioned before, same exact code works fine on Windows and Android OS!
If I try to login directly from my website not via client's website "iframe", it works fine using MacOS on both Safari and Chrome.
I am not sure why MacOS behave this way when an iframe used to embed another website!
Any feedback or suggestions are highly appreciated.