LiveCode server as OAuth2 client for APIs?

Keith Clarke keith.clarke at me.com
Wed Dec 6 05:00:58 EST 2023


Hi folks,
Does anyone have experience of using OAuth2 with LiveCode server, to log into third-party data sources for API access?
 
I am experimenting with a web based utility app that runs on LiveCode server & RevIgniter and I need to be able to log into a Salesforce.com <http://salesforce.com/> account to pull data into the app via APIs. I’m following the Salesforce Oauth 2.0 Web Server Flow for Web App Integration https://help.salesforce.com/s/articleView?id=sf.remoteaccess_oauth_web_server_flow.htm&type=5 and 

I’ve configured the LiveCode app as a connected app in a Salesforce developer instance, to create a consumer id, with which I can request an authorisation code. This requires a POST to a Salesforce endpoint, which, if successful redirects to a page on the Salesforce authorisation server to provide login credentials. This is where I’m stuck...

The LiveCode OAuth2 library seems to be desktop centric (expecting any redirects via the loopback IP address of 127.0.0.1, rather than a URL); the RevIgniter forms library seems to support posts to URLs within the LiveCode app but not third party URLs; and if I create a LiveCode file to ‘post data to URL tSalesforceAuthURL’ from within RevIgniter, I can’t see any option to follow redirects and so, unsurprisingly, the page URL doesn’t change.

Any advice greatly appreciated.
Best,
Keith      


More information about the use-livecode mailing list