REFACTOR: Remove `Discourse.authenticationComplete`

REFACTOR: Remove Discourse.authenticationComplete

diff --git a/app/assets/javascripts/discourse/app/app.js b/app/assets/javascripts/discourse/app/app.js
index a22244c..458f63a 100644
--- a/app/assets/javascripts/discourse/app/app.js
+++ b/app/assets/javascripts/discourse/app/app.js
@@ -18,12 +18,6 @@ const Discourse = Application.extend({
 
   Resolver: buildResolver("discourse"),
 
-  authenticationComplete(options) {
-    // TODO, how to dispatch this to the controller without the container?
-    const loginController = this.__container__.lookup("controller:login");
-    return loginController.authenticationComplete(options);
-  },
-
   _prepareInitializer(moduleName) {
     const module = requirejs(moduleName, null, null, true);
     if (!module) {
diff --git a/app/assets/javascripts/discourse/app/initializers/auth-complete.js b/app/assets/javascripts/discourse/app/initializers/auth-complete.js
index 31101d9..159de96 100644
--- a/app/assets/javascripts/discourse/app/initializers/auth-complete.js
+++ b/app/assets/javascripts/discourse/app/initializers/auth-complete.js
@@ -14,9 +14,10 @@ export default {
     if (lastAuthResult) {
       const router = container.lookup("router:main");
       router.one("didTransition", () => {
-        next(() =>
-          Discourse.authenticationComplete(JSON.parse(lastAuthResult))
-        );
+        next(() => {
+          let loginController = container.lookup("controller:login");
+          loginController.authenticationComplete(JSON.parse(lastAuthResult));
+        });
       });
     }
   }

GitHub sha: ebc0298e

This commit appears in #10480 which was merged by eviltrout.