How to login into wordpress in both cross-origin (iframe) and same-origin scenario?

Viewed 1322

I use iframes to display contents from a site aaa.com to a bbb.com where users can register and login to download pro documentations.

And now Chrome blocks all cookies without "Samesite=None ; Secure" attributes and users can't no longer register or login from site bbb.com

I tried the plugin SameSite Cookies but it breaks the login and register on site aaa.com and didn't change anything for site bbb.com

So my question is : if I'm getting to set all cookies with "SameSite=None ; Secure" attributes, do you think users will be able to login and register in both same-origin (aaa.com) and cross-origin (bbb.com) scenario ?

And if not do you have any other idea how to achieved this (wordpress REST API maybe)?

Any suggestions will be greatly appreciated

Thanks

1 Answers

I found this solution for an apache server.

Add this line in the header module section of the .htaccess file.

Header always edit Set-Cookie (.*) "$1; SameSite=None; Secure

That works like a charme for me.

Hope that's help!

Related