0

I am trying to build an application where the requirement is to integrate Spartacus with CDC for all the external users and use SAML SSO for ASM users. CDC is working great out of the box with Spartacus, and SSO is integrated on the Hybris Backend and works well on the acc storefront.

I know from a similar question that SSO is not supported OOTB on Spartacus and that I'll need to modify the authentication flow on Spartacus to be able to achieve that. Being a novice on Angular and to SAML, I have a few questions :

  1. Even if I follow one of the guides on the question above, how do I tie it up with SAML as well as Hybris Backend to login a user from Hybris DB?
  2. How do I modify the auth flow to support both the systems instead of either CDC or SSO?

If you also have any samples or references to a project that does similar modifications, that would be awesome.

1 Answers1

1

The CDC authentication for Spartacus uses a custom token granter in Hybris implemented in GigyaCustomTokenGranter.java. Since your requirement is to use both SSO and CDC for authentication, you would need to modify this.

  1. Once the SSO based authentication is implemented in Spartacus, after the user is authenticated, invoke the CDC SDK to log in the user and create a session. (You can reuse the Logic implemented for the accelerator storefront).
  2. If the SSO fails and you get an error response on Spartacus, try the usual CDC based authentication.
Dharman
  • 30,962
  • 25
  • 85
  • 135
Sherwin Varghese
  • 481
  • 1
  • 5
  • 7