OAuth2 Library troubleshooting
keith.clarke at me.com
Fri Jul 20 15:01:33 EDT 2018
Thanks for the response - here and in the forum post.
The process is failing at step one before any attempt to return the token, so I think it’s a LiveCode OAuth library/documentation issue - as the parameters that open a blank browser dialogue in LC work fine in Postman’s token request form to get a login page returned.
Time to revisit the web viewer and attempt to roll my own.
> On 20 Jul 2018, at 18:11, Pi Digital via use-livecode <use-livecode at lists.runrev.com> wrote:
> Hi Keith
> It is not recommended to use localhost as a redirect. What I tend to do is set up a blank php or jsp on my website and use that as the redirectURL. This url is used to send the token to in a browser request. If the page fails or does not exist then that token is never received. The guide on Salesforce site (the one you linked to) says:
>> Salesforce appends access token information to the redirect URL with the following values:
> And will look like this:
> I hope this helps
> Sean Cole
> Pi Digital
>> On 20 Jul 2018, at 17:11, Keith Clarke via use-livecode <use-livecode at lists.runrev.com> wrote:
>> Hi folks,
>> I’m trying to access the Salesforce.com <http://salesforce.com/> REST API from LiveCode via their UserAgent flow https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/intro_understanding_user_agent_oauth_flow.htm <https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/intro_understanding_user_agent_oauth_flow.htm>
>> ...but am struggling with seeding the OAuth2 library to get an authorisation page returned that isn’t blank.
>> I’m not getting any error messages - just silent failures. I did discover that the redirect_url needed to be secure and so have configured https://localhost <https://localhost/> on my Mac but am now deep in guesswork-land.
>> The docs are light regarding the OAuth2 library beyond definitions and a single example - and there’s little on the forums. I started a forum thread a few days ago - https://forums.livecode.com/viewtopic.php?f=11&t=31291&p=169196#p169196 <https://forums.livecode.com/viewtopic.php?f=11&t=31291&p=169196#p169196> but I’m guessing this subject is either dead easy (and hence I’m being a numpty!) or very unpopular! :-D
>> Any clues how I can approach debugging would be greatly appreciated.
>> Thanks & regards,
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
More information about the use-livecode