[英]Trigger transition to 'loading' route after ember-simple-auth authentication
[英]Ember simple auth: how to redirect back to the last visiting route after authentication?
如果用户尝试访问/protected-route
,则在/login
路由上完成用户身份ember-simple-auth
后使用ember-simple-auth
,如何将用户重定向回/protected-route
?
有配置可以在验证后定义路由,但是如何完成这样的事情?
您应该将ApplicationRouteMixin
混合到ApplicationRouteMixin
程序路由中,并且用户在登录后将转换为protected route
。
有关更多信息,请参见http://ember-simple-auth.com/api/classes/ApplicationRouteMixin.html上的 ApplicationRouteMixin
文档以及sessionAuthenticated
方法
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.