Created
August 31, 2017 07:50
-
-
Save wuarmin/f66815d77355e817c7f57141a8d07876 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ENV from '../config/environment'; | |
import Configuration from 'ember-simple-auth/configuration'; | |
import setupSession from 'ember-simple-auth/initializers/setup-session'; | |
import setupSessionService from 'ember-simple-auth/initializers/setup-session-service'; | |
export default { | |
name: 'ember-simple-auth', | |
initialize(registry) { | |
const config = ENV['ember-simple-auth'] || {}; | |
if(config.baseURL === undefined) { | |
config.baseURL = (ENV.rootURL !== undefined ? ENV.rootURL : ENV.baseURL) | |
} | |
Configuration.load(config); | |
setupSession(registry); | |
setupSessionService(registry); | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
With this ember-simple-auth-initializer one can set
ENV['ember-simple-auth'] = { baseURL: '' }
in config/environment.js