function signInSuccessWithAuthResultCallback(redirect, opt_manualRedirect) {
  return function(authResult, redirectUrl) {
    // Save sign in callback parameters to confirm callback invoked.
    signInCallbackUser = authResult.user;
    signInCallbackRedirectUrl = redirectUrl;
    signInCallbackCredential = authResult.credential;
    signInCallbackAdditionalUserInfo = authResult.additionalUserInfo;
    signInCallbackOperationType = authResult.operationType;
    // Developer manually redirects and redirect URL available.
    if (opt_manualRedirect && redirectUrl) {
      firebaseui.auth.util.goTo(redirectUrl);
    }
    return redirect;
  };
}
@param {boolean} redirect The return status of the success callback.
@param {boolean=} opt_manualRedirect Whether the developer manually
    redirects to redirectUrl.
@return {!firebaseui.auth.widget.Config.signInSuccessWithAuthResultCallback}
    sign in success with auth result callback function.