开发者

Can ASP.NET support seamless Single Sign on across multiple domains?

开发者 https://www.devze.com 2023-02-25 05:54 出处:网络
I have been trying to Google over this topic like crazy. I have this primary domain that has got a couple of subdomains and alied domains. All of these sites share the same set of members that will lo

I have been trying to Google over this topic like crazy. I have this primary domain that has got a couple of subdomains and alied domains. All of these sites share the same set of members that will log-on. Naturally I will have to give them a single sign-on. So I have been looking various forums(including ours) and still have no luck. This is what I have done uptil now.

I have set a common machine key and decryption key of all the websites and also my authentication mode is set to forms. As far as开发者_运维知识库 sub domains are concerned, they work fine and a user signed in on the primary gets acknowledged on the sub-domain. The same case unfortunately does not work on domains(and I know cookies cannot be accessed across domains but I have set the machine key and decryption key).


Yes and no. .NET does not support this "out of the box".

If you're willing to force users to a specific domain to sign in, you can then redirect users to that domain/login page. After you have authenticated the user on your primary domain, then you redirect the user back to their original page and post some kind of encryption key to the page that tells the site that the user is authenticated, you then set a cookie for the new domain if you want a persistent authentication cookie.

This is more or less the method used by sites such as Stack Overflow when using Open ID, or for msn when using live id.

0

精彩评论

暂无评论...
验证码 换一张
取 消