How to handle multiple sites with separate user logins?

Disclaimer: I’m still quite new to Litium, so feel free to point out things if I’m missing anything obvious. Using Litium 6.

We have a B2B site and want to add multiple B2C sites. These sites share the assortment but will use different price lists. The important thing is that the user accounts should be separate, so a user registered on site1 can only use that account for site1. If the user wants to shop at site2, he or she should create an account there.

What would be the best way to set this up?
I’m thinking that it might be possible to use groups somehow and modify the login and session validation logic somehow. Another option would be to add a domain/site field to the database, but that might not even be possible?
Or there might be other solutions?

Any pointer on a good approach would be appreciated.

Litium version: 6.1.1

A group is a good solution.

Define a group pointer-property on your website and use that to define which group should have access to your site. Then on login you check that the user logging in is member of the websites group.

Edit:
Noticed you are using Litium 6, in that version you cannot define the property on the website so you need to add a property on one of the settings-pages on the website.

I think you also should prefix all the login with a value, like the site name they belong to, then the user on site1 can’t login on site2.

Thank you both for your responses! I have a clearer view of what I should do now :slight_smile: