I don't think you have that ability in the config/enviroment.js
file. What I think you can do is redirect to some route you have, and use that route to redirect to the place you want. Like:
//config/environment.js
ENV['ember-simple-auth'] = {
authorizer: 'authorizer:custom',
routeAfterAuthentication: '/some-route',
routeIfAlreadyAuthenticated: '/some-route'
};
//router.js
this.route('some-route', { path: '/some-route' });
this.route('user-dashboard', { path: '/:id/dashboard' });
//some-route.js
export default Ember.Route.extend({
userSession: Ember.inject.service(),
beforeModel() {
const user = userSession.get('currentUser');
this.transitionTo('user-dashboard', user);
}
});
This example assumes that you have some sort of user-session
service where you can .get('currentUser')
which is the logged in user. So that you can pass that model to the transitionTo
method.
Hope it helps.