{"error":"invalid_grant","error_description":"request not supported on this domain"}
const client = new PubSubApiClient({
authType: 'oauth-client-credentials',
loginUrl: process.env.SALESFORCE_LOGIN_URL, // https://test.salesforce.com
clientId: process.env.SALESFORCE_CLIENT_ID,
clientSecret: process.env.SALESFORCE_CLIENT_SECRET
});
getting: [cause]: Error: Authentication error: HTTP 400 - {"error":"invalid_grant","error_description":"request not supported on this domain"}.
Tried to enable everything in connected app, nothing works, same credentials are working with connecting via Nextjs.app, pleaase help me find out what can cause this and how to fix that. Thank you
Hi @shalikas, this looks like either a connected app configuration issue or a client configuration issue. Since you've managed to log in with another app, I'll assume that it's the latter.
Try to switch loginUrl to your Org's domain. This should do the trick.
@shalikas did you solve your issue?
@shalikas did you solve your issue?
sadly no, it works perfectly with authType: 'username-password', but with 'oauth-client-credentials' it is not working for me giving same results even with loginUrl passed as Org's domain, probably some configuration on connected app side is failing, if i find out, i will let you know. Thank you