• Robert Knight's avatar
    Replace OAUTH_TOKENS_CHANGED event · 85832d6d
    Robert Knight authored
    Remove the last remaining use of the `$rootScope` service to broadcast /
    subscribe to the `OAUTH_TOKENS_CHANGED` event.
    
    Instead the `auth` service is now an `EventEmitter` and the `session`
    service subscribes directly to `oauthTokensChanged` events from it.
    Whereas we replaced most other events with observers which react to data
    changing in the store, this particular use case doesn't lend itself to
    that and it makes more sense for the `auth` service to emit events to
    notify interested consumers.
    85832d6d
index.js 6.56 KB