mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-13 22:41:32 -05:00
62684dffff
issue #5751 - moves `makeRequest` override of simple-auth's OAuth authenticator into our own custom authenticator (previously our override was not taking effect until after ember-simple-auth's initial authentication routines, hence why it was working for post-login token refreshes but failing on app-boot)
18 lines
468 B
JavaScript
18 lines
468 B
JavaScript
import Ember from 'ember';
|
|
|
|
var AuthenticationInitializer = {
|
|
name: 'authentication',
|
|
|
|
initialize: function (instance) {
|
|
var store = instance.container.lookup('store:main'),
|
|
Session = instance.container.lookup('simple-auth-session:main');
|
|
|
|
Session.reopen({
|
|
user: Ember.computed(function () {
|
|
return store.find('user', 'me');
|
|
})
|
|
});
|
|
}
|
|
};
|
|
|
|
export default AuthenticationInitializer;
|