Is there a way to maintain a member login / cookie between sites?
So if I logged in as a member on www.site1.local and the clicked a link on www.site1.local which took me through to www.site2.local (both running on the same umbraco instance) I would still be logged in on www.site2.local?
In .NET you can maintain session through the use of a database. If both sites use this database then yes, the session should be maintained. Assuming both sites are running from the same installation of Umbraco, then the login would be maintained.
This is standard ASP.NET session management though. You basically switch from In Process to either database or state server and then you can have single sign in by securely passing the email address from site 1 and then logging in as the user with that email address on site 2.
You would create an instance of the member as follows:
Member theMember = Member.GetMemberFromEmail(Session["email"]);
Finally, use Member.AddToCache(theMember) and then use umbraco.library.IsLoggedIn() to check if it works.
Andrew. I have recently achieved single sign on between an asp.net website and an Umbraco installation that was configured to use that website's membership.
Presuming your 2 sites are using the same membership database and are on the same web server you should be almost there.
So that www.site1.local will know you are already logged into www.site2.local and not prompt you to log in again, the trick is to use the same application name in the web.config file in the places where the forms authentication and membership settings are declared. This works as both sites will be looking for the same forms authentication ticket on the client pc.
Membership login maintained across multiple sites
Hi All,
Is there a way to maintain a member login / cookie between sites?
So if I logged in as a member on www.site1.local and the clicked a link on www.site1.local which took me through to www.site2.local (both running on the same umbraco instance) I would still be logged in on www.site2.local?
Many thanks in advance
Technical Dogsbody
Hi
In .NET you can maintain session through the use of a database. If both sites use this database then yes, the session should be maintained. Assuming both sites are running from the same installation of Umbraco, then the login would be maintained.
This is standard ASP.NET session management though. You basically switch from In Process to either database or state server and then you can have single sign in by securely passing the email address from site 1 and then logging in as the user with that email address on site 2.
You would create an instance of the member as follows:
Finally, use Member.AddToCache(theMember) and then use umbraco.library.IsLoggedIn() to check if it works.
See here for more details.
Hope this helps.
- Chris Randle
Andrew. I have recently achieved single sign on between an asp.net website and an Umbraco installation that was configured to use that website's membership.
Presuming your 2 sites are using the same membership database and are on the same web server you should be almost there.
So that www.site1.local will know you are already logged into www.site2.local and not prompt you to log in again, the trick is to use the same application name in the web.config file in the places where the forms authentication and membership settings are declared. This works as both sites will be looking for the same forms authentication ticket on the client pc.
That worked for me anyway
is working on a reply...