WordPress Single Sign-On and SameSite=None

21 Likes Comment

I have a main site and some child sites on the WordPress. And I wanted to create Single Sign-On, but I noticed the problem with directive SameSite in the cookies disallow me to make it.

Because if SameSite isn’t set then that will use default value Lax. A litlle bit reseach and I understood I can fix the problem via wp-config.php redefine the constants COOKIEPATH, SITECOOKIEPATH, PLUGINS_COOKIE_PATH

define( 'COOKIEPATH', '/; Secure; SameSite=None; ' );
define( 'SITECOOKIEPATH', '/; Secure; SameSite=None; ' );
define( 'PLUGINS_COOKIE_PATH', '/wp-content/plugins/; Secure; SameSite=None; ' );

 

You might like

About the Author: Oleksandr Sovenko

Leave a Reply

Your email address will not be published. Required fields are marked *