我已为我的Ember应用程序注册和登录工作但由于某种原因'routeIfAlreadyAuthenticated'目前无效。这是我的设置:
config/environment.js
'ember-simple-auth': {
authenticationRoute: 'auth.login',
routeIfAlreadyAuthenticated: 'rows',
routeAfterAuthentication: 'rows'
}
但如果我在登录后说/auth/login
,则不会将我重定向到rows
路线。有人知道我做错了什么吗?
答案 0 :(得分:3)
您的登录路线应该延伸unauthenticated-route-mixin
mixin:
import Route from '@ember/routing/route';
import UnauthenticatedRouteMixin from 'ember-simple-auth/mixins/unauthenticated-route-mixin';
export default Route.extend(UnauthenticatedRouteMixin, {
});