Meteor - unable to call loginWithToken from Meteor or Accounts

别来无恙 提交于 2020-01-16 06:41:29

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!