Meteor.user() returns null when I removed autopublish

#1

I have Googled this question for a while but I’m finding it difficult to find a working solution.

I removed autopublish, and could no longer access Meteor.user(). It returns null. It works fine when I use autopublish.

Do I need to subscribe to get user data?

#2

Are you logged in? Meteor.user() returns null when there is no current user.

See here how to add account UI and other things you need

1 Like
#3

Yeah I’m definitely logged in. It was working fine until I removed autopublish.

#4

No, you are not logged in, if you were, Meteor.User() would not return null :slight_smile:

1 Like
#5

Oh no I wasn’t logged in. Do sessions expire when using Facebook login?