I have two web sites: one built with aspx and the other built with php. Both apps have a log in system. I need it so that the user can log in to the php site and when they visit the aspx site they continue being logged in and vice versa. So basically a log in that works for both different sites. How do I develop this?
1 Answer
Three thoughts come to mind:
.NET typically stores login in a cookie, you could update the forms auth to save a cookie for your other site and update the other site to do the same. Then have each site look for the cookie.
Save your sessions in a database and then have each site hit the same sessions database.
Use something like memcache to save sessions and have each site read from there.
7 Comments
coder3
How would I accomplish no. 2?
endyourif
Are you using a framework of any sorts? Some of them already support it.
endyourif
Otherwise you would have to update the login process to write to a database table that would have to be check upon visit to the other site for an active session and then auto log them in. You would also then need a script to clear old sessions, e.g. inactive for 20 minutes.
coder3
No framework from php. I think .net for aspx. Would the session parameters between aspx and php be compatible?
endyourif
You would probably need to write some logic to make them.
|