Virto111
Virto111

Reputation: 587

SAP Spartacus - single Spartacus application for multiple web stores

How to set up a single Spartacus application to run several different web stores against a single BA Hybris (several Base Stores).
We need to ensure that the user sessions are not mixing.
What would be the configuration for the Spartacus and what are the eventual implications.
What should be done on the BA side.

Thank you in advance.

Upvotes: 3

Views: 524

Answers (1)

mkysoft
mkysoft

Reputation: 5758

Spartacus can automatically detect existing sites with requesting below URL: https://backend.site/occ/v2/basesites?fields=baseSites(uid,defaultLanguage(isocode),urlEncodingAttributes,urlPatterns,stores(currencies(isocode),defaultCurrency(isocode),languages(isocode),defaultLanguage(isocode)),theme,defaultPreviewCatalogId,defaultPreviewCategoryCode,defaultPreviewProductCode)&lang=en&curr=USD Spartacus will match current URL with existing website URLs on backaoffice. Check spartacus documentation for details.

You need custom implementation for prevent mixing user sessions. Because spartacus using OAuth2 protocol. You can use UserFilter or others for checking it.

You didn't share your customization so I can't say about your BE works.

If you haven't got any customization, you just need to implement filter for checking user tokens for preventing mixing sites in BE side.

Upvotes: 3

Related Questions