问题
I'm trying to call loginWithToken from Meteor, using the following:
Meteor.loginWithToken(secret)
Accounts.loginWithToken(secret)
but am getting
TypeError: Object [object Object] has no method 'loginWithToken'
for both.
The method exists in Meteor and is public facing (although it isn't documented), is there some package I need to include?
回答1:
This is because loginWithToken can only be called from the client.
来源:https://stackoverflow.com/questions/35419371/meteor-unable-to-call-loginwithtoken-from-meteor-or-accounts