我们有一个项目,我们运行Meteor作为web前端,我们在另一个端口有PHP+nginx,用于从移动平台调用api。
Meteor和PHP后台连接到通用mongo数据库。
Meteor在授权和注册时不向服务器发送明文密码,并使用安全远程密码协议。
Meteor.loginWithPassword(user, password, [callback])不能在服务器上使用
如何创建可以注册/授权的web服务,并向移动客户端提供可用于授权的令牌?
发布于 2013-02-15 16:06:21
我知道这有点棘手,因为到meteor的POST和GET请求还没有很好的访问,我认为这在路线图上,但你可以尝试一下。我从另一个answer借来的
您可以尝试为特定的JS请求创建自定义节点路由。e.g
__meteor_bootstrap__.app.stack.splice (0, 0, {
route: '/checklogin',
handle: function (req,res, next) {
username = req.param('username') //req contains POST data
//Check whether the thing is logged in
//Other stuff..
res.send({success:false..}});
}.future ()
});https://stackoverflow.com/questions/14865144
复制相似问题