身份验证状态ember-simple-auth

时间:2017-01-05 10:39:59

标签: ember.js ember-simple-auth

我在ESA中使用这种配置模式,它正在使用Ember 2.9.2:

//config/environment.js
'ember-simple-auth': {
  authenticationRoute: 'visitor.login',
  routeAfterAuthentication: 'app',
  routeIfAlreadyAuthenticated: 'app'
}


//app/router.js
Router.map(function() {
  // This route is the only one with the `UnauthenticatedRouteMixin`
  this.route('visitor', { path: '' }, function() {
    this.route('login');
  });
  // This route is the only one with the `AuthenticatedRouteMixin`
  this.route('app', { path: '/' }, function() {
    this.route('my_account');
  });
});

这曾经很好地适用于Ember 2.9.2,但当移动到Ember 2.10时,我最终得到了错误You may not add a duplicate route named 'application'

配置模式是不是很糟糕?我怎么能解决它?

感谢您的帮助!

0 个答案:

没有答案