0

Basically I just want to know how does StackExchange's single signon system work?
In the SE network you need to login only once in one of the websites to be automatically logged in to the other sites upon visiting.

How should I implement such a feature in my own network of sites?

I assume it uses the cookie which resides on the user's browser and then authenticates it with the originating site. If it is legit then it logs the user in automatically.

2hamed
  • 8,719
  • 13
  • 69
  • 112

1 Answers1

0

You have to implement SAML or oauth2 to allow sso on your network.

In case of SAML your child websites will be service providers or resource servers.

While you need to setup and identity provider.

The sequence of events will be like this. 1. User hits a url of songs website, this site is resource server and does not handle authentication. 2.To authenticate resource server will construct a SAML authrequest and redirects to identity provider after signing it. Idp verifies the signature after receiving authrequest. 3. User will be presented with a login form, user has to end login credentials. 4. After user authentication idp will generate a SAMl token and redirect back to resource server. 5. Resource server will extract identity information from SAML token, resource server will login the user with session or cookie.

Depends upon which technology you are working in i have implemented it in php using simplesamlphp.

MHS
  • 111
  • 1
  • 3