【发布时间】:2014-05-06 05:50:40
【问题描述】:
似乎需要使用iron-router(或类似的)来创建端点路由。这当然不应该在客户端完成;但我不确定如何实现此服务器端,因为您无法检查用户是否已登录(Meteor 报告 Meteor.userId can only be invoked in method calls):
this.route('sso', {
where: 'server',
path: '/sso',
onBeforeAction: function() {
if (Meteor.user()) {
this.redirect('endpoint url');
}
}
});
在 Meteor 中实现端点单点登录的最佳方法是什么?
【问题讨论】:
标签: meteor single-sign-on