"You are not authorized to access this page." in Chrome after returning from offsite payment After concluding checkout flow on site I'm redirected to offsite payment service (Datatrans).
There if I finish payment and I get redirected back to:
/checkout/order_number/payment/return
or I cancel payment and get redirected back to:
/checkout/order_number/payment/cancel
on site I get the message:
You are not authorized to access this page.
At that point I'm not logged out - if I just reload the page (click on browser address bar and hit enter to open page again. I get redirected to:
/checkout/order_number/order_information
Important - this happens only in Google Chrome. In Firefox this works well.
Possible solution would be adding following rows to .htaccess file inside &lt;IfModule mod_headers.c&gt; block.
  Header always edit Set-Cookie (.*) &quot;$1; SameSite=None; Secure&quot;
  Header onsuccess edit Set-Cookie (.*) &quot;$1; SameSite=None; Secure&quot;

Some more info on this issue:
https://docs.datatrans.ch/v1.0.1/docs/security-samesite-cookies