Hello there, I built a sign in form on my landing page with phoenix liveview. The sign in form is a passwordless sign in, meaning the flow is:
- The user fills out email and clicks submit
- Navigates away to their email client
- Clicks on a link in their email which takes them to a new tab back to my site where they are now logged in.
What I would like is that just after step three, when they open a new tab on my site, the previously open tab (which they filled out sign in form on) can be notified that the user now has a session and redirect to the logged in page.
The sign in page is using liveview, but the page I was going to redirect them to after they log in is not currently using liveview.
I was hoping there is an idiomatic pattern(s) to have a connected client be notified a new session exists and perform some action (in this case a redirect). Does the pub/sub module help here? Any recommended approaches?