Search code examples
ember.jsember-simple-auth

Swapping the stores


I was wondering if I could swap the stores somewhere in an initializer. The thing is, I want to check the window.navigator object for something, and decide which store ember-simple-auth should use.

Thanks.


Solution

  • You can do that in an initializer that runs before the 'simple-auth' initializer and modifies the app's ENV (ENV['simple-auth'].store is the value you'd want to set).