Open janwidmer opened 11 months ago
SAP Commerce already has an optional feature for isolating users in between different basesites. You need to enable this feature in backend for a certain CMS basesite, when creating it. See docs: - https://help.sap.com/docs/SAP_COMMERCE_CLOUD_PUBLIC_CLOUD/20125f0eca6340dba918bda360e3cdfa/9f2c404f118c439087cc0e1d88e16712.html?q=isolation
Then CMS /basesites returns isolated:true
for a certain basesite and then Spartacus' AuthMultisiteIsolationService kicks in.
Closing, as not-an-issue. But please let me know in case I missed something and you believe there still exist an issue.
@Platonn are you sure, this also works with CDC as Login Provider? Because from what I can see, the call to CDC for login is made without and addition to the user id. And from the code, I don't see a place, where the AuthMultisiteIsolationService
is used from within CDC code..
We are NOT using the default spartacus login / registration forms, as they where not implemented to use for CDC, when we did the initial project..
Thank you for helping me understand the problem is with User Isolation + CDC. Reopening
Thanks. I renamed the ticket to make it more clear.
Describe the bug When the user is logging in, the call to the authorization server (or to CDC in case when CDC is used) is made. After that Call, the received toke is written to the local storage entry
spartacus⚿⚿auth
and to a behaviour subject stored in the application.For our customer, we have the case, that a different base site with separated users is running on a sub path of the domain:
https://www.example.com => base site B2C https://www.example.com/b2b => base site B2B
With the current version of spartacus, the following problem occurs:
Tell us the version of Spartacus
To Reproduce Steps to reproduce the behavior:
Expected behavior The local Storage Entry is scoped to the active base site (same as it is done for the local storage cart entry) or the local storage entry can be configured via config to be able to set it via dynamic confi initializer
Desktop (please complete the following information):
Smartphone (please complete the following information):