Redirection from one domain to another domain | Community
Skip to main content
Level 2
February 26, 2025
Solved

Redirection from one domain to another domain

  • February 26, 2025
  • 5 replies
  • 980 views

Redirection from one module to another module is working in publish environment but if we check in domains it's asking for login everytime in each domain but is not happening in publish instance.

Best answer by Uppari_Ramesh

@deepankar2 If you are having 2 no of publishers with different domains and if you are expecting token to work without asking login then you need to use encapsulated token support. Please find below article for stateless authentication using crypto.

https://experienceleague.adobe.com/en/docs/experience-manager-65/content/security/encapsulated-token 

 

Note: If you change crypto keys then your keystore, SAML SSO will fail and you need to re create the keystore again.

 

Thanks

Ramesh

5 replies

Rohit_Utreja
Community Advisor
Community Advisor
February 26, 2025

Hi @deepankar2 ,

Are you trying to redirect from one domain to another domain within dispatcher?
would it be possible for you to share more details on the module (are they two different websites within AEM dispatcher)?

kautuk_sahni
Community Manager
Community Manager
February 26, 2025

@konstantyn_diachenko @shiv_prakash_patel @abhishekanand_ @a_h_m_imrul @madhur-madan @bhavanibharani @chitramadan @dinesh_a @adityasuratwala If you're available, please check out this question and share your thoughts. Your help means a lot!

Kautuk Sahni
abhishekanand_
Community Advisor
Community Advisor
February 26, 2025

would need more details, can you please provide the exact issue with some more details @deepankar2 

Abhishek Anand
Level 2
February 26, 2025

Hi @abhishekanand_ ,

We got a requirement for SSO login functionality.
what we have done is we set token in cookie for both module and is working fine in publish environments as there was only one domain that is out publish domain.

But when we push this to our higher environment there are two different domains and just because of different domains we are not able to use the cookies, and is asking for login.

What we need to do for this case?

Thanks,
Deepankar

Uppari_Ramesh
Uppari_RameshAccepted solution
Level 5
February 26, 2025

@deepankar2 If you are having 2 no of publishers with different domains and if you are expecting token to work without asking login then you need to use encapsulated token support. Please find below article for stateless authentication using crypto.

https://experienceleague.adobe.com/en/docs/experience-manager-65/content/security/encapsulated-token 

 

Note: If you change crypto keys then your keystore, SAML SSO will fail and you need to re create the keystore again.

 

Thanks

Ramesh

daniel-strmecki
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
February 26, 2025

Hi @deepankar2,

although technically possible it's not a good practice to use cookies across domains. The recommended approach for SSO across different domains is to use an external authentication provider:

  • Configure AEM's SAML Authentication Handler or OAuth Authentication Handler.
  • Set up an IDP that supports federated login.
  • Ensure that both domains are registered as valid redirect/callback URLs in the IDP.

 

Good luck,

Daniel