I have been trying to set up Circle ci with GitHub for continuous integration and continuous delivery(CI/CD) in salesforce dx project using this refernce link, but I'm facing an issue with the connected app for JWT authorization in Circle Ci using this SFDX command.
sfdx force:auth:jwt:grant --clientid $HUB_CONSUMER_KEY --jwtkeyfile assets/server.key --username $HUB_SFDC_USER --setdefaultdevhubusername -a hub
Which works fine in the local system, as per reference link I have configured the environment variable and connected app with the right setup
This org appears to have a problem with its OAuth configuration. Reason: invalid_grant - user hasn't approved this consumer
I have googled about this error and found that I have to authorize our connected app once to refresh token then it will work fine but still get no success. Here are my some findings
Salesforce JWT User Hasn't Approved This Consumer (Again)
{ "error" : "invalid_grant", "error_description" : "user hasn't approved this consumer"}
Any help with this will save my time.