【发布时间】:2017-05-14 12:31:01
【问题描述】:
我正在使用 Auth0 和 Lock 10,但在弄清楚如何正确自定义锁时遇到了很多麻烦。
在 Angular 的配置阶段,lockProvider.init 提供“redirectUrl”参数,根据快速入门指南here。
问题是,如果用户已经注册,我想将他们重定向到一个路由(我正在使用 ui-router),如果他们以前注册过并且他们现在正在登录,我想将他们重定向到另一个路由。
我不认为我可以在函数运行后更改 lockProvider.init 变量,并且 redirectTo 变量不在调用 show() 以调出锁定模式时可以更改的选项列表中。
任何帮助都将不胜感激...我觉得我对锁的理解一定缺少一些东西,因为我看不出它可以如何用于除了简单的登录窗口之外的任何东西。
【问题讨论】:
-
The problem is that I would like to redirect users to one page if they have signed up, and another page if they have previously signed up, and they are now signing in你的意思是重定向到不同的route还是像一个实际的页面 home.html 或 profile.html ? -
没错。更新了:)