我的应用程序中有以下 Auth 对象:
App.Auth = Ember.Auth.create
signInEndPoint: '/users/sign_in'
signOutEndPoint: '/users/sign_out'
tokenKey: 'auth_token'
tokenIdKey: 'user_id'
userModel: 'App.User'
modules: ['emberModel', 'rememberable', 'actionRedirectable']
actionRedirectable:
signInRoute: 'home'
signOutRoute: 'login'
rememberable:
tokenKey: 'remember_token'
period: 7
autoRecall: true
具有身份验证的一切都运行良好。但是,我现在看到的问题是,当用户尝试访问“mydomain.com/#/articles/12”并拥有有效的记住令牌时,访问应用程序就等于开始新的启动应用程序。用户通过记住令牌登录,actionRedirectable 接管并将用户带到 HomeRoute,而不是转到请求的资源。
我觉得我可以通过手动转换相关登录/注销控制器中的路由来解决这个问题,但我想知道在 EmberAuth 中是否有解决这个问题的方法?