BernardoBF4's avatar

Authentication for separate systems

I am currently working on a e-commerce wich has a CMS for managing content that will be shown in the site and product related configurations such as pricing, shipping, etc. In the same project I have the e-commerce itself, where clients will have to signup and login to be able to buy. The login of the CMS and of the site have different fields for login and signup; for example, the CMS doesn't require the user to add an address to their account, but the site does. So my doubt is, how should I build the auth system for both the CMS and site, knowing they'll need to have different fields and are in the same Laravel project?

0 likes
3 replies
Sinnbeck's avatar

Use the same users table and just have different tables with the meta data needed for each. And the sign up part is completely in your control. Just force different validation on each page

1 like
BernardoBF4's avatar

@Sinnbeck Thanks. That's a nice ideia, but is this a good practice? I mean, it seems wrong to mix site and cms users on the same table. Some people say these two should be separte projects altogether, but this seems weird to, since I'd have to create a login system for the site project but that would be dependant on data from the CMS projects.

Sinnbeck's avatar
Sinnbeck
Best Answer
Level 102

@BernardoBF4 if they are the same site, then I would stick to 1 users table. Trust me. You will save yourself a lot of time down the road if you don't have to handle auth for two tables. You can even add a type column to the table.

Or make 2 completely seperate sites, if they have nothing to do with each other

Feel free to let others give their opinions as well

1 like

Please or to participate in this conversation.