I have 2 Websites (ASP .NET MVC3) and both have their own authentication methods.
The idea is to link the users from the Website #1 with the users accounts of the Website #2.
I have no clue how it might be done technically.
What I think is about a sort of "background" login but how it can be done?
I just need some draft of possible correct solutions.
Basically we can add the Map Table into the Website #2 and check if the WebSite#1UserId is there and if not show the popup to login/register for the Website#2.
But if we will do it i.e. in iframe
then will it work? So we are able to login at the same time into both websites when the first login goes through the "normal" flow and we have some extra code that is going to login for the UserID in the Mapped Table and realize the "background" login for the second website...
Or even I have to create code to play around with cookie of the Website#2?
So I am not sure about the proper solution. But I see the
A. Use hidden iframe
and simulate the "background" login.
B. Use pure C# code within login method of the WebSite#1 and use SOMEHOW (POST,GET,... ?) to get logged in to Website#2 and get access to all its pages.
Thank you!
P.S. Is it possible to use this solution Dummy form to submit like the real login form + http://msdn.microsoft.com/en-us/library/bb310861.aspx
and there is another solution Login to website, via C#