code: function() {
        // Sets pending redirect status before redirect to
        // accountchooser.com.
        firebaseui.auth.storage.setPendingRedirectStatus(app.getAppId());
        firebaseui.auth.acClient.trySelectAccount(
            function(isAvailable) {
              // Removes the pending redirect status if does not get
              // redirected to accountchooser.com.
              firebaseui.auth.storage.removePendingRedirectStatus(app.getAppId());
              // On empty response, post accountchooser.com result (either empty
              // or unavailable).
              firebaseui.auth.widget.handler.common.accountChooserResult(
                  app,
                  isAvailable ?
                     firebaseui.auth.widget.Config.AccountChooserResult.EMPTY :
                     firebaseui.auth.widget.Config.AccountChooserResult
                     .UNAVAILABLE,
                  function() {
                    firebaseui.auth.widget.handler.handle(
                        firebaseui.auth.widget.HandlerName.SIGN_IN, app,
                        container);
                    // If accountchooser.com is available or uiShown callback is
                    // forced, run uiShown callback.
                    if (isAvailable ||
                        firebaseui.auth.widget.handler.common.acForceUiShown_) {
                      uiShownCallback();
                    }
                  });
            },
            firebaseui.auth.storage.getRememberedAccounts(app.getAppId()),
            opt_callbackUrl);
      }
docs: If there is no pending accountchooser.com response and provider sign in is not to be rendered, try to select account from accountchooser.com. Do not redirect to accountchooser.com directly, instead package routine in continue callback function to be passed to accountchooser.com invoked handler.