I’m working with SalesForce oAuth integration and I need to separate the scopes with a url encoded %20. If I put a space in the scope separator in Wappler, the scopes are sent in a url paramenter separated with a + sign. I’ve tried putting %20, + and %2B as scope separators without success.
Would the above be possible with the recently added ability to write our own modules, ie taking the current OAuth module and hardcoding the %20 instead of + for URL encoded spaces, @Teodor, @George ?
The plus sign is btw the correct encoding according to the http specs. Strange that SalesForce does not support that. Seeing also other users having problem with it.
SalesForce seems not to adhere to standardize OAuth in many aspects, until a few months back you could use only one scope, but recently and without warning they have enforced two scope in order to get a refresh token.
In my case this is a big deal and my only way out is to write full custom code, but if there is a way of using Wappler to meet these requirements, it would really go a long way. I don’t know how many other users in this community may be benefit from this though, if it were to come from a feature within wappler, but if there is a way to hack or modify the current behavior, I’m more than willing to take it and write a tutorial on the subsequent implementation, my next few weeks are going to be fully oriented with working on several instances of SFDC.
Hi @patrick,
I just started working on this, on my copy of dmxConnectLib/lib/oauth/Oauth2.php, the above was found in line 170, and when running the action, I get an error 500. On checking it a little closer, I get this error returned: Fatal error: Cannot redeclare lib\oauth\Oauth2::get() in /volume1/web/instance_1/dmxConnectLib/lib/oauth/Oauth2.php on line 189
I get the same error when reverting to the original page/code, I wonder if something has been introduced since we last exchanged (I’m using wappler 3.5.1) that affects everyone, since there is an obvious delta with the line numbers.
Thanks @Patrick. How do these updates work with existing websites? I’m assuming that when creating an action/step, the latest version is applied, but how are existing websites /apps affected when one updates wappler and there is a pre-existing version of a step that has been updated in between wappler upgrades?
Previous actions should still work, no update needed for them, if there are any issues then please post the issue and we will fix it. It should be backwards compatible.
I just upgraded to 3.5.2 and on my development environment, I know have this error in all pages: {"code":0,"file":"\/volume1\/web\/instance_1\/dmxConnectLib\/modules\/auth.php","line":72,"message":"Call to undefined method lib\\auth\\Provider::get()","trace":"#0 \/volume1\/web\/instance_1\/dmxConnectLib\/lib\/App.php(193): modules\\auth->restrict(Object(stdClass), NULL)\n#1 \/volume1\/web\/instance_1\/dmxConnectLib\/lib\/App.php(157): lib\\App->execSteps(Object(stdClass))\n#2 \/volume1\/web\/instance_1\/dmxConnectLib\/lib\/App.php(127): lib\\App->execSteps(Array)\n#3 \/volume1\/web\/instance_1\/index.php(19): lib\\App->exec(Object(stdClass), true)\n#4 {main}"}
I did apply the last file you provided, but it hasn’t fixed it and I wonder if App.php needs also an upgrade? Oddly enough, my production environment didn’t break (thankfully enough).
I was editing my oauth server action and adding a get parameter, I see a reference there, it may come from there and the back compatibility of the global actions?
I’m editing an existing app/site, I wonder where I am overwriting new files.
The new file didn’t fix the issue, I get the same error. I think it may come from the new input variables, I added a get parameter to my server action and that’s when I first noticed it didn’t work, and would explain why my prod is still working, since I didn’t upload the get parameter action there.