-
Notifications
You must be signed in to change notification settings - Fork 5.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[1.8.3] onLogin handler fired twice #10853
Comments
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
not stale |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Still not state in Meteor 1.10.2 - just upgraded, same issue. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Also I notice that still happens the two fire |
a WA could use a |
Same issue in Meteor 1.11. |
It seems like there's a few separate bugs going on here. On initial loginA seemingly old bug in I made a PR to fix it (and a related bug): #11173 On load when already logged inOn refresh, it is called once by I assume this is the bug that didn't happen on 1.8.1. I haven't looked into it further yet. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Still happening on Meteor 1.11. |
This should be fixed on Meteor 1.12 |
Was optimistic v1.12 would solve my double login issue, but I guess not.
I wonder if it has something to do with this part of
I can tell that the |
@namenotrequired maybe @jasongrishkoff's case is a different one? |
Same behavior here as @jasongriskoff - When I log in with my React form, it fires once. When using a resume token it's firing twice in rapid succession. It seems like a race condition to me. The time between the two logins is median 70 to 80 milliseconds but as high as 400 millis. I also tried removing all onLogin callbacks and just putting in a single one as a test. Would it be possible to reopen this issue? |
This bug might be simpler to find than we thought. It looks like the first time it fires, |
@jamesloper this is exactly the problem I'm having, it fires twice, but the first time Meteor.user() is not available; the second time it its. |
This issue persists as per #11446, which was closed as a duplicate of this one. |
@jasongrishkoff & @namenotrequired you were right on target. Sorry I just noticed this issue. To speed things up next time:
Sorry I goofed it & sorry I did not see this earlier! Simple fix. |
@filipenevola this is still going on in 2.5.3 |
Updating the version from 1.8.1 to 1.8.3, notice that a part of the code that relies in a callback to
Accounts.onLogin()
method from it’s being called twice. reference to https://forums.meteor.com/t/onlogin-handler-fired-twice-meteor-1-8-3/51224.onLogin
callback should run onceonLogin
callback runs twiceonLogin
callback fire twice, can check by a simpleconsole.log()
. Project: https://github.com/AndyCC25/meteor-login-bugThe text was updated successfully, but these errors were encountered: