Meteor - 无法从 Meteor 或 Accounts 调用 loginWithToken [英] Meteor - unable to call loginWithToken from Meteor or Accounts

查看:68
本文介绍了Meteor - 无法从 Meteor 或 Accounts 调用 loginWithToken的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用以下命令从 Meteor 调用 loginWithToken:

I'm trying to call loginWithToken from Meteor, using the following:

Meteor.loginWithToken(secret)

Accounts.loginWithToken(secret)

但是我得到了

TypeError: Object [object Object] 没有方法 'loginWithToken'

对于两者.

方法 存在于 Meteor 和是面向公众的(虽然没有记录),我需要包含一些包吗?

The method exists in Meteor and is public facing (although it isn't documented), is there some package I need to include?

推荐答案

这是因为 loginWithToken 只能从客户端调用.

This is because loginWithToken can only be called from the client.

这篇关于Meteor - 无法从 Meteor 或 Accounts 调用 loginWithToken的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆