Authenticating a user for a single app with multiple domains
Posted
by
hofnarwillie
on Stack Overflow
See other posts from Stack Overflow
or by hofnarwillie
Published on 2012-06-21T09:04:40Z
Indexed on
2012/06/21
9:16 UTC
Read the original article
Hit count: 183
I have one asp.net web application, but two different domains point to this web app. For instance: www.one.com
and www.two.com
both point to the same web app.
I have an issue where I need certain pages to be on a specific domain (due to some security requirements from our online payment provider - a third party website). So let's say page1.aspx
needs to be called on www.two.com
The process is as follows:
- A user logs into
www.one.com
- The authentication cookie is saved to the browser
- The user then navigates to
page1.aspx
and, if on the wrong domain, gets redirected to the correct domain. (this redirection happens onpage1.aspx
in thepage_load
event) - Then asp.net redirects the user to the login screen, because the authentication cookie is not sent to
www.two.com
.
How can I track the user and keep him/her logged in between the two domains?
© Stack Overflow or respective owner