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).
                      var AccountChooserResult =
                          firebaseui.auth.widget.Config.AccountChooserResult;
                      firebaseui.auth.widget.handler.common.accountChooserResult(
                          app,
                          isAvailable ?
                            AccountChooserResult.EMPTY :
                            AccountChooserResult.UNAVAILABLE,
                          function() {
                            // If not available, go to the sign-in screen and no
                            // UI shown callback.
                            firebaseui.auth.widget.handler.handle(
                                firebaseui.auth.widget.HandlerName.SIGN_IN,
                                app,
                                container,
                                opt_email);
                          });
                    },
                    firebaseui.auth.storage.getRememberedAccounts(app.getAppId()),
                    app.getConfig().getWidgetUrl(
                        firebaseui.auth.widget.Config.WidgetMode.SELECT));
              }
docs: Do not redirect to accountchooser.com directly, instead package routine in continue callback function to be passed to accountchooser.com invoked handler.