Error unsupported_grant_type when login
See original GitHub issueI’ve tried tutorial from this website --> https://jsforce.github.io/ however,
whenever I tried to login, I got an error ‘unsupported_grant_type’ as following:
{ unsupported_grant_type: grant type not supported at C:\Users\lusiana.wijayanti\Documents\mycustomapp\app\api\node_modules\jsforce\lib\oauth2.js:195:19 at tryCallOne (C:\Users\lusiana.wijayanti\Documents\mycustomapp\app\api\node_modules\promise\lib\core.js:37:12) at C:\Users\lusiana.wijayanti\Documents\mycustomapp\app\api\node_modules\promise\lib\core.js:123:15 at flush (C:\Users\lusiana.wijayanti\Documents\mycustomapp\app\api\node_modules\asap\raw.js:50:29) at _combinedTickCallback (internal/process/next_tick.js:73:7) at process._tickCallback (internal/process/next_tick.js:104:9) name: 'unsupported_grant_type' }
Does anyone ever come across the same issue? If yes, some advice will be very helpful.
Issue Analytics
- State:
- Created 6 years ago
- Comments:14
Top GitHub Comments
I’ve seen this error for the first time today when trying to connect my app with a client’s Sandbox org. What fixed it in my case was using https://test.salesforce.com as the login URL.
You can try to remove the loginUrl param from the oAuth connection options, worked for me:
SALESFORCE_OAUTH: new jsforce.OAuth2({ // loginUrl : process.env.SALESFORCE_LOGIN_URL, clientId : process.env.SALESFORCE_CONSUMER_KEY, clientSecret : process.env.SALESFORCE_CONSUMER_SECRET, redirectUri : process.env.SALESFORCE_OAUTH_REDIRECT })