D
D
Daniel2018-10-21 12:23:32
HTTP Cookies
Daniel, 2018-10-21 12:23:32

How to make a single sign-on (authorization) for domains and subdomains?

Hello.
I have a network of WordPress MU sites.
Some of them are located on other domains, that is, the main network domain is abc.ru, and the address of another site is sub.xyz.ru. How can I make it so that when I log in to abc.xyz/login, I will be logged in to all sites. The list of sites is known.
I found this explanation on the Internet, but here only on subdomains - https://wp-kama.ru/question/krossdomennaya-avtoriz...

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Sobolev, 2018-10-21
@san_jorich

If we are on the login page then:
var login = jQuery('#login').val();
var password = jQuery('#password').val();
foreach (pages aka page){
helmet ajax post with login and password
- There you can form a url like site/login page? login=login&password=password (I don't remember exactly)
- Or jQuery for each input to substitute the value
If success function(){ console. log('May happiness be with us!..'); alert('happiness and cookies');}
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question