-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Add Accounts.onLogout(func) Hook #6889
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
Conversation
|
Test failed in livedata package. Could someone help me discover the issue on this please? Only did work in Failed Test: EDIT It seems that checking out commit 7012957a still has the same failing test. My guess is that this issue is not related and outside the scope of this PR. |
|
This feature is very important. Thank you for working on this, hopefully this onLogout hook will be available soon. |
|
Can you rebase this to be off of current Also, note that the docs have moved to https://github.com/meteor/docs. Sorry this PR got caught up in that change, so for now just remove the docs changes from the PR and we'll open a PR there once this commit is in. |
|
add this!! |
|
This would be great 👍 |
| } | ||
| }); | ||
|
|
||
| var capturedLogouts = {}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be an array ([])?
|
Seems to be a major asymmetry here. The relevant connection id has to be scrounged up with At the very least, the userId of the user logging out, and current connection should be provided.... |
|
@convexset #7433 should be released in 1.4.1 soon. |
|
is onLogout available ? |
Accounts.onLogout(func)is practically identical to the implementation ofAccounts.onLogin(func). This PR is an effort to maintain symmetry between the available Login / Logout hooks.Use cases include destroying active session variables, reverting UI elements, and any other cleanup that needs to occur immediately after the user is logged out.
This PR is related to the following discussions:
#5984
#3867
#1074
#426
Corresponding user-facing documentation has also been provided in this PR, as well as appropriate tests.