Announcement

Collapse
No announcement yet.

Nodejs integration for the oauth authorization

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Nodejs integration for the oauth authorization

    I need to create an integration with quickbooks, but it doesn't have a client-based oauth library like google does. Are they any disadvantages as to using nodejs for the oauth integration? I am using http://oauth.net/core/1.0a/#anchor43, as a reference as to how to obtain tokens, but I'm a bit confused on the oauth_signature. I used http://forum.espocrm.com/forum/devel...tom-javascript as reference to including an external library.They have a custom button ("ipp:connectToIntuit"), but the button doesn't show on the page. Also not sure where to include the code below:
    PHP Code:
    var parser document.createElement("a");  â€‹parser.href document.url;     intuit.ipp.anywhere.setup({    menuProxy:"",    grantUrl"http://" parser.hostname "/pathname"  }); 

  • #2
    It wouldn't recommend because users of your plugin will need to deploy nodejs app.

    Comment


    • elbowprogrammer
      elbowprogrammer commented
      Editing a comment
      I added the &quot;intuit.ipp.anywhere-1.3.3.js&quot; in client/libs directory. Then I add the path in jsLibs.json file. The intuit button is &quot;<ipp:connectToIntuit></ipp:connectToIntuit>&quot;, and I add the button to the tpl file, but it doesn't show on the page. And where I include the code below?
      PHP Code:
      var parser document.createElement(&quot;a&quot;);
      parser.href document.url;
      intuit.ipp.anywhere.setup({
      menuProxy:&quot;&quot;,
      grantUrl: &quot;redirectUrl&quot;
      }); 
      If I can get the button to visible and execute the granturl the way it's suppose to be, that would be the first accomplishment down the long road of integrating quickbooks. Would very much appreciate your help yuri .
      Last edited by elbowprogrammer; 06-22-2016, 07:56 PM.

  • #3
    I add the intuit library to jslibs.json, and add their connecttointuit button to a tpl file. I cleared the cache. Why is the button not visible? And which function would I add the code below to?
    PHP Code:
    var parser document.createElement("a");
    parser.href document.url;

    intuit.ipp.anywhere.setup({
    menuProxy:"",
    grantUrl:""
    }); 

    Comment


    • #4
      Did you include your lib in AMD way in Espo.define function ?

      Comment


      • #5
        Yes, like so,
        PHP Code:
        Espo.define("some directory",["some dependency","lib!Intuit"

        Comment


        • #6
          and after that you can use your lib in setup or afterReder methods

          Comment


          • #7
            I can't even get the button to be visible in the tpl file. Their tag is,
            PHP Code:
            <ipp:connectToIntuit></ipp:connectToIntuit
            . And that element is not visible. Their library inserts "<a href="javascript:void(0)" class="intuitPlatformConnectButton">Connect with QuickBooks</a>" and their library uses the value assigned to grantUrl to redirect me.

            Comment


            • #8
              If the connecttointuit button isn't visible, and I can't use nodejs to run oauth authentication, what is the best method?

              Comment


              • #9
                I add the intuit library in the jslibs, and I add the quickbooks button (<ipp:connectToIntuit></ipp:connectToIntuit>) to tpl file. The only time I need to use the library is when I need to setup the grantUrl, but the library makes the xml tags visible. And also the oauth is done on the server side, and there is no client-side oauth for intuit. IF I CAN GET THE BUTTON TO BE VISIBLE IN THE TPL FILE, AND HAVE THE LIBRARY DOES REDIRECTION PROCESS WHEN THE BUTTON IS CLICKED, I CAN MOVE ON TO THE NEXT STEP.
                Last edited by elbowprogrammer; 07-13-2016, 02:54 PM.

                Comment

                Working...
                X