Last active
August 29, 2015 14:09
-
-
Save gwendall/1f05d48ec954fa469916 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var loggedIn = false; | |
Meteor.autorun(function() { | |
var user = Meteor.user(); | |
if (user) { | |
if (!loggedIn) { | |
loggedIn = true; | |
/* Login callback */ | |
} | |
} else { | |
if (loggedIn) { | |
loggedIn = false; | |
/* Logout callback */ | |
} | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment