Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

phuocbt9x's avatar

Use 1 login session for 2 websites with separate BE and FE

I have 2 websites using the same database, I am having a problem! How if website A is logging in and accessing website B, it will automatically log in with website A account on the same device! Similar to above, log in to B and open A to log in automatically These two websites are separate and only use the same database

0 likes
4 replies
Tray2's avatar

Are you using different domains? Are you storing the session in the database?

phuocbt9x's avatar

@Tray2 Oh, my two websites both have different domain names? I was assigned such a task by my boss to research but have not found a solution

martinbean's avatar

@phuocbt9x Why are they separate if they’re using the same database and you want them to use the same login? That sounds like they should be the same app to me!

1 like

Please or to participate in this conversation.