如何处理 Meteor post-login 深度链接
How to handle Meteor post-login deep linking
未经授权的用户试图加载 my.app/path/to/auth/only/view
,但 Meteor 将他们重定向到服务器根目录 my.app/
以进行登录。如何将该用户 post-login 重定向到 /path/to/auth/only/view
?
我正在使用 kadira:flow-路由器,帐户-密码,useraccounts:core。
在调用 FlowRouter.go()
.
的 onLogin
回调 (http://docs.meteor.com/api/accounts-multi.html#AccountsCommon-onLogin) 上注册
哈,我刚刚从我的主模板中删除了它。问题已解决。
Template.globalLayout.onCreated(function () {
Deps.autorun(function () {
if(Meteor.user()===null){FlowRouter.go('/');}
)}
});
未经授权的用户试图加载 my.app/path/to/auth/only/view
,但 Meteor 将他们重定向到服务器根目录 my.app/
以进行登录。如何将该用户 post-login 重定向到 /path/to/auth/only/view
?
我正在使用 kadira:flow-路由器,帐户-密码,useraccounts:core。
在调用 FlowRouter.go()
.
onLogin
回调 (http://docs.meteor.com/api/accounts-multi.html#AccountsCommon-onLogin) 上注册
哈,我刚刚从我的主模板中删除了它。问题已解决。
Template.globalLayout.onCreated(function () {
Deps.autorun(function () {
if(Meteor.user()===null){FlowRouter.go('/');}
)}
});