code: function(providerId, opt_email) {
      // If popup flow enabled, this will fail and fallback to redirect.
      // TODO: Optimize to force redirect mode only.
      // For non-Google providers (not supported yet). This may end up signing the
      // user with a provider using different email. Even for Google, a user can
      // override the login_hint, but that should be fine as it is the user's
      // choice.
      firebaseui.auth.widget.handler.common.federatedSignIn(
          app, component, providerId, opt_email);
      return goog.Promise.resolve(true);
    }
docs: Sign in with a provider ID.
  @param {string} providerId The Firebase Auth provider ID to sign-in with.
  @param {?string=} opt_email The optional email to sign-in with.
  @return {!goog.Promise<boolean>}