# Where does the application instance get saved to in production?

**URL:** <https://discuss.emberjs.com/t/where-does-the-application-instance-get-saved-to-in-production/8962>\
**Category:** Ember CLI\
**Created:** [October 15, 2015, 6:19pm UTC](https://discuss.emberjs.com/t/where-does-the-application-instance-get-saved-to-in-production/8962 "2015-10-15T18:19:17Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![tsteuwer](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/tsteuwer/32/10887_2.png) [@tsteuwer](https://discuss.emberjs.com/u/tsteuwer)\
**Post date:** [October 15, 2015, 6:19pm UTC](https://discuss.emberjs.com/t/where-does-the-application-instance-get-saved-to-in-production/8962/1 "2015-10-15T18:19:17Z")

</div>

Short story: So one of our developers has created an OAuth with a popup that references the container based on `window.opener.APP_NAME_HERE`. However, in production mode, that application instance is no longer there.

I know this is a horrible idea (and its a simple internal tool at the moment so theres no issues with security) and we’re changing this, but is there a way that in production mode in the mean while? I’ve looked through the entire window object and can’t find it anywhere.

---

<div class="post-metadata">

**Author:** ![brian\_ally](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/brian_ally/32/10571_2.png) [@brian\_ally](https://discuss.emberjs.com/u/brian_ally)\
**Post date:** [October 15, 2015, 8:25pm UTC](https://discuss.emberjs.com/t/where-does-the-application-instance-get-saved-to-in-production/8962/2 "2015-10-15T20:25:57Z")

</div>

window.Ember.Application AFAIK

---

<div class="post-metadata">

**Author:** ![tsteuwer](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/tsteuwer/32/10887_2.png) [@tsteuwer](https://discuss.emberjs.com/u/tsteuwer)\
**Post date:** [October 15, 2015, 8:39pm UTC](https://discuss.emberjs.com/t/where-does-the-application-instance-get-saved-to-in-production/8962/3 "2015-10-15T20:39:00Z")

</div>

Unfortunately that’s just a class, not the instance

---

<div class="post-metadata">

**Author:** ![brian\_ally](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/brian_ally/32/10571_2.png) [@brian\_ally](https://discuss.emberjs.com/u/brian_ally)\
**Post date:** [October 15, 2015, 9:26pm UTC](https://discuss.emberjs.com/t/where-does-the-application-instance-get-saved-to-in-production/8962/4 "2015-10-15T21:26:05Z")

</div>

Right. I was thinking maybe you could get access to the actual app instance from there. In production it’d be minified i suppose, so i don’t know that it would be easily accessible by looking through the window properties. I presume it’s a closure in there somewhere.

Have you looked into Simple-Auth?

---

<div class="post-metadata">

**Author:** ![tsteuwer](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/tsteuwer/32/10887_2.png) [@tsteuwer](https://discuss.emberjs.com/u/tsteuwer)\
**Post date:** [October 15, 2015, 10:30pm UTC](https://discuss.emberjs.com/t/where-does-the-application-instance-get-saved-to-in-production/8962/5 "2015-10-15T22:30:08Z")

</div>

I looked through all of that and wasn’t able to find it

---

<div class="post-metadata">

**Author:** ![acorncom](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/acorncom/32/12198_2.png) [@acorncom](https://discuss.emberjs.com/u/acorncom)\
**Post date:** [October 16, 2015, 3:24am UTC](https://discuss.emberjs.com/t/where-does-the-application-instance-get-saved-to-in-production/8962/6 "2015-10-16T03:24:10Z")

</div>

I think you’re looking for [GitHub - ember-cli/ember-export-application-global](https://github.com/ember-cli/ember-export-application-global)

---

<div class="post-metadata">

**Author:** ![tsteuwer](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/tsteuwer/32/10887_2.png) [@tsteuwer](https://discuss.emberjs.com/u/tsteuwer)\
**Post date:** [October 16, 2015, 1:32pm UTC](https://discuss.emberjs.com/t/where-does-the-application-instance-get-saved-to-in-production/8962/7 "2015-10-16T13:32:08Z")

</div>

Genius!!! Thank you so much. I can’t believe I didn’t think about the application initializer! Thanks so much @acorncom
