Cross Domain Login

I have two domains to point to the same server(same application) but when I switch the domain I lose the login session.
How to login a user automatically when transferred from one domain to another?

Is this the best solution:

Pedro Coelho
Any suggestion?
That seems to be the best process. I'll have a situation like that for a few days and I can do some tests of different tricks, but it looks standard.

Have you read this dicussion? I'm out of ideas besides any of those two.

I think there is alternative if both your domains are sub-domains belonging to the same domain.
Like domain1.company.com and domain2.company.com.
In this situation you can do a Set Cookie targeting for the "company.com". This way both your sites would be able to read the cookie and avoid all that logic with parameters.

João Rosado

Is different domains. I will opt for the first solution.

Thanks for the feedback

How do you do logout in one domain and on the other do it automatically?

HI All,

Is anybody succeeded with different domain use case here, we are also struggling for SSO implementation for 2 different domain.

But only the difference is we calling different domain portal in iframe.


Thanks & Regards


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.