Will onLogin callback fire on existing browser tab reactive login?

I’m looking at using passwordless login for an app I’m currently developing, using one of the available packages that accomplishes this within the accounts framework.

The app will include a designer tool that will allow users to begin a new project before signing up. I would like them to be able to “sign up or sign in to save this”.

I see that Meteor login state is reactive across multiple tabs within the same browser. Since following an e-mail link for passwordless login will (should) open in a new tab, their already-open tab (with an in-progress design) should reactively log in.

The Question: Will registered AccountsCommon#onLogin callbacks fire in that tab, as well as the tab that’s actually processing the passwordless login token? Catching this in the designer template logic would allow me to associate the in-progress design with the newly-logged-in account.


1 Like

Hi Dave,

i just did a small experiment in one of my apps and the onLogin callback fired in the active tab first, then, after a short delay of about a second, in all other tabs simultaniously :slight_smile:


Fantastic, thanks so much for testing this out!