Question

We have implemented Intuit connect button functionality as per the following link:

https://ipp.developer.intuit.com/0010_Intuit_Partner_Platform/0025_Intuit_Anywhere/0020_Connect/0010_From_Within_Your_App/Add_the_Connect_Button

It works great all the way to the end but instead of returning control to parent page, it is opening the application in the popup. I really don't know what I am missing here. Below is our unit test page for this feature:

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ipp="">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
<meta http-equiv="Cache-control" content="no-cache"/>
<title>Intuit Test Page</title>
<script src="https://js.appcenter.intuit.com/Content/IA/intuit.ipp.anywhere.js" type="text/javascript">
    </script>
<script type="text/javascript">
    intuit.ipp.anywhere.setup({
      menuProxy: 'myserver.com/intuit/proxy',
      grantUrl: 'myserver.com/intuit/connect'
    });
    </script></head><body>
    <ipp:connectToIntuit></ipp:connectToIntuit>
    </body>
    </html> 

The code is same except the server name. I really appreciate if you can provide some inputs on this?

Was it helpful?

Solution

The OAuth process for Intuit Anywhere always opens in a pop-up. It's designed specifically to do that.

When they click the button the pop-up will open, they'll go through the OAuth connection process, and eventually be forwarded back to your application. Your application should then close the pop-up window, and refresh the parent page of your application (so that the blue dot menu shows up on the page to show that they are connected).

OTHER TIPS

I found a really easy solution to this problem.

In your controller in the validated action you can specify this:

render :text => '<script type="text/javascript">window.opener.location.reload(true);window.close();</script>'

This will cause the popup to be closed and the calling window to refresh automatically.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top