{"id":838,"date":"2010-11-19T17:12:44","date_gmt":"2010-11-19T23:12:44","guid":{"rendered":"http:\/\/www.uv.mx\/personal\/gvera\/?p=838"},"modified":"2011-10-24T17:15:55","modified_gmt":"2011-10-24T22:15:55","slug":"word-press-single-sign-on","status":"publish","type":"post","link":"https:\/\/www.uv.mx\/personal\/gvera\/2010\/11\/19\/word-press-single-sign-on\/","title":{"rendered":"Word Press Single Sign-On"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.uv.mx\/personal\/gvera\/files\/2010\/11\/sso-300x242.jpg\" alt=\"\" width=\"300\" height=\"242\" class=\"aligncenter size-medium wp-image-1246\" srcset=\"https:\/\/www.uv.mx\/personal\/gvera\/files\/2010\/11\/sso-300x242.jpg 300w, https:\/\/www.uv.mx\/personal\/gvera\/files\/2010\/11\/sso.jpg 421w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><br \/>\nThis was actually intented for a Multi-Network-Multi-Site Word Press installation. But I can work with single separated Word Press installations. You only require that the users have the same username and password among sites.<\/p>\n<h4>Single Sign-On between different WP installations<\/h4>\n<p>Find this part in your root or parent wp-config.php (\/).<!--more--><br \/>\n[php]<br \/>\n\/**#@+<br \/>\n * Authentication Unique Keys and Salts.<br \/>\n *<br \/>\n * Change these to different unique phrases!<br \/>\n * You can generate these using the {@link https:\/\/api.wordpress.org\/secret-key\/1.1\/salt\/ WordPress.org secret-key service}<br \/>\n * You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again.<br \/>\n *<br \/>\n * @since 2.6.0<br \/>\n *\/<br \/>\n[\/php]<br \/>\nAdd this just below it:<br \/>\n[php]<br \/>\ndefine(&#8216;COOKIE_DOMAIN&#8217;, false);<br \/>\ndefine(&#8216;ADMIN_COOKIE_PATH&#8217;, &#8216;\/&#8217;);<br \/>\ndefine(&#8216;COOKIEPATH&#8217;, false);<br \/>\ndefine(&#8216;SITECOOKIEPATH&#8217;, false);<br \/>\ndefine(&#8216;COOKIEHASH&#8217;, md5(&#8216;http:\/\/YOUR_ROOT_SITE&#8217;));<br \/>\n[\/php]<br \/>\nNow copy the entire block from this root file wp-config.php (\/) and replace it in the new installation wp-config.php (\/blogs\/) file.<br \/>\n[php]<br \/>\n\/**#@+<br \/>\n * Authentication Unique Keys and Salts.<br \/>\n *<br \/>\n * Change these to different unique phrases!<br \/>\n * You can generate these using the {@link https:\/\/api.wordpress.org\/secret-key\/1.1\/salt\/ WordPress.org secret-key service}<br \/>\n * You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again.<br \/>\n *<br \/>\n * @since 2.6.0<br \/>\n *\/<\/p>\n<p>define(&#8216;COOKIE_DOMAIN&#8217;, false);<br \/>\ndefine(&#8216;ADMIN_COOKIE_PATH&#8217;, &#8216;\/&#8217;);<br \/>\ndefine(&#8216;COOKIEPATH&#8217;, false);<br \/>\ndefine(&#8216;SITECOOKIEPATH&#8217;, false);<br \/>\ndefine(&#8216;COOKIEHASH&#8217;, md5(&#8216;http:\/\/YOUR_ROOT_SITE&#8217;));<\/p>\n<p>define(&#8216;AUTH_KEY&#8217;,         &#8216;SOME CRAZY CHARACTERS YOUR INSTALLATION GENERATED&#8217;);<br \/>\ndefine(&#8216;SECURE_AUTH_KEY&#8217;,  &#8216;SOME CRAZY CHARACTERS YOUR INSTALLATION GENERATED&#8217;);<br \/>\ndefine(&#8216;LOGGED_IN_KEY&#8217;,    &#8216;SOME CRAZY CHARACTERS YOUR INSTALLATION GENERATED&#8217;);<br \/>\ndefine(&#8216;NONCE_KEY&#8217;,        &#8216;SOME CRAZY CHARACTERS YOUR INSTALLATION GENERATED&#8217;);<br \/>\ndefine(&#8216;AUTH_SALT&#8217;,        &#8216;SOME CRAZY CHARACTERS YOUR INSTALLATION GENERATED&#8217;);<br \/>\ndefine(&#8216;SECURE_AUTH_SALT&#8217;, &#8216;SOME CRAZY CHARACTERS YOUR INSTALLATION GENERATED&#8217;);<br \/>\ndefine(&#8216;LOGGED_IN_SALT&#8217;,   &#8216;SOME CRAZY CHARACTERS YOUR INSTALLATION GENERATED&#8217;);<br \/>\ndefine(&#8216;NONCE_SALT&#8217;,       &#8216;SOME CRAZY CHARACTERS YOUR INSTALLATION GENERATED&#8217;);<\/p>\n<p>\/**#@-*\/<br \/>\n[\/php]<br \/>\nThe important part here is that the characters &#8216;SOME CRAZY CHARACTERS YOUR INSTALLATION GENERATED&#8217; are the same between installations.<\/p>\n<p>I haven&#8217;t tryied this on a separate domain installation. But this works great on subdirectories installation.<\/p>\n<p>Hope this works for you as much as it\u2019s been working for me so far.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This was actually intented for a Multi-Network-Multi-Site Word Press installation. But I can work with single separated Word Press installations. You only require that the users have the same username and password among sites. Single Sign-On between different WP installations Find this part in your root or parent wp-config.php (\/).<\/p>\n","protected":false},"author":2,"featured_media":1246,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10,27],"tags":[11,66,12],"class_list":["post-838","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog","category-wordpress-2","tag-articulos-2","tag-sso","tag-wordpress"],"_links":{"self":[{"href":"https:\/\/www.uv.mx\/personal\/gvera\/wp-json\/wp\/v2\/posts\/838","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.uv.mx\/personal\/gvera\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.uv.mx\/personal\/gvera\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.uv.mx\/personal\/gvera\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.uv.mx\/personal\/gvera\/wp-json\/wp\/v2\/comments?post=838"}],"version-history":[{"count":0,"href":"https:\/\/www.uv.mx\/personal\/gvera\/wp-json\/wp\/v2\/posts\/838\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.uv.mx\/personal\/gvera\/wp-json\/wp\/v2\/media\/1246"}],"wp:attachment":[{"href":"https:\/\/www.uv.mx\/personal\/gvera\/wp-json\/wp\/v2\/media?parent=838"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.uv.mx\/personal\/gvera\/wp-json\/wp\/v2\/categories?post=838"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.uv.mx\/personal\/gvera\/wp-json\/wp\/v2\/tags?post=838"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}