# I can't set the config variables for ember-simple-auth

**URL:** <https://discuss.emberjs.com/t/i-cant-set-the-config-variables-for-ember-simple-auth/18657>\
**Category:** Routing\
**Created:** [February 24, 2021, 10:28am UTC](https://discuss.emberjs.com/t/i-cant-set-the-config-variables-for-ember-simple-auth/18657 "2021-02-24T10:28:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Usama\_Hamed](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/usama_hamed/32/17371_2.png) [@Usama\_Hamed](https://discuss.emberjs.com/u/Usama_Hamed)\
**Post date:** [February 24, 2021, 10:28am UTC](https://discuss.emberjs.com/t/i-cant-set-the-config-variables-for-ember-simple-auth/18657/1 "2021-02-24T10:28:21Z")

</div>

I have problems in setting the config variables for ember simple auth. i am currently working on removing the depreciation Mixins like `ApplicationRouteMixin` and i want to set up the variables like :

```auto
            routeAfterAuthentication: 'protected.index',
            routeAfterLogout: 'login',
            registerRoute: 'signup',
            routeIfAlreadyAuthenticated: 'protected.index',

```

currently, i added it inside the enviroument.js file but the problem is after i login successfully, the session does not redirect to the index route. so it doesn’t recognize routeAfterAuthentication value.

---

<div class="post-metadata">

**Author:** ![dknutsen](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/dknutsen/32/16471_2.png) [@dknutsen](https://discuss.emberjs.com/u/dknutsen)\
**Post date:** [February 24, 2021, 3:32pm UTC](https://discuss.emberjs.com/t/i-cant-set-the-config-variables-for-ember-simple-auth/18657/2 "2021-02-24T15:32:13Z")

</div>

I think they moved away from configuring these values in `config/environment.js` a long time ago. Back when it was removed (~ESA 1.2) you had to do it like [this](https://github.com/simplabs/ember-simple-auth/pull/985#issuecomment-314817585).

However in newest ESA it sounds like there is [a new suggested approach](https://github.com/simplabs/ember-simple-auth/issues/2240)

---

<div class="post-metadata">

**Author:** ![dknutsen](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/dknutsen/32/16471_2.png) [@dknutsen](https://discuss.emberjs.com/u/dknutsen)\
**Post date:** [February 24, 2021, 3:35pm UTC](https://discuss.emberjs.com/t/i-cant-set-the-config-variables-for-ember-simple-auth/18657/3 "2021-02-24T15:35:03Z")

</div>

Oh actually this may just be due to a bug that was fixed: [routeAfterAuthentication configuration key bug · Issue #2231 · simplabs/ember-simple-auth · GitHub](https://github.com/simplabs/ember-simple-auth/issues/2231)
