Hi @Ammar Idrees
Thank you for posting your query on Microsoft Q&A.
I understand that you are trying to logout two applications, and the two applications are running on separate sub-domains. The session data is typically stored in the browser, and since each sub-domain is treated as a separate domain by the browser, the session data for one sub-domain is not available to the other.
To resolve this issue, you'll need to implement Single Logout (SLO) in your Single Sign-On (SSO) system. SLO allows users to log out of all the applications they have logged into, instead of having to log out of each application individually.
Here are the steps you can follow to implement SLO:
1.Create a logout endpoint in your SSO server that will clear the user's session data when it is called.
2.When the user logs out of Application 1, make an HTTP request to the logout endpoint to clear their session data.
3.When Application receives the logout request, it should also clear its own session data. This will ensure that the user is logged out of both applications.
4.You can also implement a redirect mechanism that will redirect the user to a common logout page after the session data has been cleared in all the applications.
By following these steps, you can ensure that when a user logs out of one application, they are automatically logged out of all the other applications they have logged into.
Hope this helps. Do let us know if you have any further queries.
If this answers your query, do click `Accept Answer`
and `Yes`
.
Thanks,
B. Siri Chandana.