OAuth2 Library troubleshooting
sean at pidigital.co.uk
Fri Jul 20 19:11:17 CEST 2018
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
> 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:
More information about the use-livecode