I'm having troubles authenticating to my Dev Hub Org using the JWT token. The command:
sfdx force:auth:jwt:grant --clientid *** --username *** --jwtkeyfile *** --setdefaultdevhubusername --instanceurl https://login.salesforce.com
results in:
ERROR: This org appears to have a problem with its OAuth configuration.
Reason: invalid_grant - expired authorization code
username: ***,
clientId: ***,
loginUrl: <Not Specified>,
privateKey: ***.
I'm curious about the Not specified
value for the loginUrl.
If it try to run the auth command in the context of a configured sfdx project, that has the default login url set to test.salesforce.org
, this URL appears as the loginUrl
and the authentication also fails (as I'm trying to login to a Dev Hub Org).
It seems that the --instanceurl
doesn't in fact override the login URL as documented? Or am I missing something here?
My sfdx
version is:
sfdx-cli/6.25.0 (linux-x64) node-v8.11.3