Where does the application instance get saved to in production?


#1

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.


#2

window.Ember.Application AFAIK


#3

Unfortunately that’s just a class, not the instance


#4

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?


#5

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


#6

I think you’re looking for https://github.com/ember-cli/ember-export-application-global


#7

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