2

I want to have several domains A, B, C where a user can enter his username and password to login to a common main domain D.

So the user goes to A, B or C, enters his username and password, clicks the "login" button, and is then on the main domain D in a logged in/authenticated state. Then the user does the things he wants to do, and then clicks the logout-button and is then returned to the original domain that he came from, be it A, B or C.

What is the best way to do this?

I currently use forms authentication in ASP.NET 4.0 (C#).

Thanks,

tomsv
  • 7,207
  • 6
  • 55
  • 88

1 Answers1

4

The feature you need is called Single Sign-On.

Look for it on SO and you find how to do it.

Take a look at http://aspalliance.com/1545_understanding_single_signon_in_aspnet_20.all

Jahan Zinedine
  • 14,616
  • 5
  • 46
  • 70
  • Can I use single sign-on even when the sites/login-pages are on different domains? As in aaa.com, bbb.com, ccc.com with the main domain being ddd.com. I guess the cookies set by A, B, C cannot be read by D? Is there some other way without cookies? – tomsv Feb 04 '11 at 10:00
  • @dontomasso You can do SSO without cookies by passing an id. E.g. http://stackoverflow.com/questions/3832057/single-sign-on-without-cookies-in-java – Jeroen K Oct 08 '13 at 09:41