更新时间:2023-12-04 08:24:10
我不知道是否你这样做的方式是最合适的,但是在客户端亲自执行以下操作来检测用户是否已登录:
I don't know if the way you're doing it is the most appropriate but personally do the following on the client side to detect if a user logged in:
Tracker.autorun(function(){
if(Meteor.userId()){
//do your stuff
}
});