Last post Oct 13, 2014 12:22 AM by necro_mancer
Oct 08, 2014 03:09 AM|ronnyrunatserver|LINK
I have my site hosted some where else and login page on other domain
I am redirecting the user from loginpage to my site using jquery ajax post method
for requesting from one to other domain i have inserted a header in my site to accept request coming from
the site where login page exists
Access-Control-Allow-Origin:login page site name
when i login from the first site it should redirect the user to landing page of my site by skipping the login page
but what it does is redirects the user to my login page again
It means session is not being set
If i login from a user in my site which creates the session on my site and if then i try the same credentials it redirects the user to landing page
so how can i manage the session here
i am setting the session on login success
which is null if user comes from login page site to my site thats why redirect to login page of my site
Oct 08, 2014 04:24 AM|AidyF|LINK
Session is unique to the domain, sites on different domains don't share session. I'm unclear if your issue is session or authentication, but you'll never get session sharing between domains. If you want some session initialization on the target site you'll
need to pass something on the querystring to tell that site it needs to initialize the session data for that user. I couldn't really work out your flow or your requirement from what you've posted so you might have to make your actual problem and your desired
result a bit clearer, but I can tell you for sure you won't get two domains sharing session.
Oct 11, 2014 12:58 AM|necro_mancer|LINK
I agree with Aidy. A session cannot be passed to the other domain. In fact, it cannot be passed to a subdomain either.
Session cannot be passed to the other server either.
Oct 12, 2014 01:28 PM|sangeeth2007|LINK
It seems you are mentioning on authentication.
I feel token token authentication can solve your issue.
Oct 13, 2014 12:22 AM|necro_mancer|LINK
would you please advise more about the token authentication?