Open davesierra opened 7 years ago
Did you solve this?
I ended up using Meteor.user()
instead of Meteor.userId
in the /
route test.
@bolaum Yep, that was my solution as well. The reason I opened this issue was that it's a bit misleading if someone were to use Meteor.userId, it caused alot of confusion and too much time spent digging around to realize this subtle difference.
if neither is defined how would we know which user is logging out ?
TL;DR
Meteor.userId() should not exist in the callback of Accounts.onLogout()
Issue
If the following holds true:
AccountsCommon#userId()
Then it doesn't make sense that on the Accounts.onLogout() callback, Meteor.userId() exists yet Meteor.user() does not.
Example
I have the following code:
So if I log out, either via clearing my loginTokens on the DB or through the 'Sign Out' button provided by Accounts, it will redirect me back to /dashboard thinking I was logged in.