Closed SelaOAL closed 7 years ago
Hi,
Did you initialize the oAuth2ThreeLegged
object like so:
var oAuth2ThreeLegged = new ForgeSDK.AuthClientThreeLegged(CLIENT_ID, CLIENT_SECRET, REDIRECT_URL, [ 'data:read', 'data:write' ]);
Mind the CLIENT_ID
, CLIENT_SECRET
, REDIRECT_URL
- you need to set them properly
I didn't set the REDIRECT_URL
, now it worked.
Great!
It says in the readme to "run the following code" for the 2-legged and 3-legged tokens, but where this code is supposed to be placed? I couldn't even find in any of the files 'CLIENT_ID'.
Edit: So I placed the 2/3-legged code in a file and ran it with node, in the 3-legged
oAuth2ThreeLegged.generateAuthUrl();
doesn't returnauthorizationCode
in the url, and if I try to navigate to that url, I get: