0

I have a SAAS software with Laravel 5.2 (PHP).

Tab A - Is my SAAS website.

Tab B - Is my client website.

SAME BROWSER

My client log-in to my system on Tab A.

I want to present something on Tab B(Client website) but only if I know that he is logged-in in Tab A or have session/cookie because of the logged-in on Tab A

How can I do it / Detect it?

Dani Banai
  • 1,080
  • 4
  • 14
  • 33
  • You want tab-b to just pick up the user login from tab-a? Or you want tab-b to work it out next time it submits to the site? – RiggsFolly Mar 02 '20 at 18:20
  • Does this answer your question? [Possible to detect if a user has multiple tabs of your site open?](https://stackoverflow.com/questions/4038629/possible-to-detect-if-a-user-has-multiple-tabs-of-your-site-open) – Jeremy Harris Mar 02 '20 at 18:20
  • @JeremyHarris Thank you, But it's didn't help :) – Dani Banai Mar 02 '20 at 18:26
  • @RiggsFolly I want to present something on Tab B but (Client website) but only if I know that he is logged-in in Tab A or have session/cookie because of he logged-in in Tab A – Dani Banai Mar 02 '20 at 18:28

1 Answers1

0

Probably the best approach is to allow the server to send websocket messages notifying all other browser tabs about the sign in event, which can then trigger a page reload for instance.

Jesse Schokker
  • 896
  • 7
  • 19