I recently refreshed my developer sandbox.
In VS Code, I ran
sfdx force:auth:web:login --setalias aliasName --instanceurl https://test.salesforce.com --setdefaultusername
It opened the OAuth window and I logged in. I noted that I wasn't prompted to grant access permission to SFDX cli, nor do I see such an app in the sandbox's app manager.
Back in VS code, if I run
sfdx force:org:display --targetusername aliasName
I get an org description of my sandbox the a Connected Status of 'Connected'. If I run
sfdx force:org:open, my sandbox opens in browser.
When I open the context menu on files in my local repo I see options for
SFDX: Deploy Source to Org and
SFDX: Retrieve Source from Org..
And yet, when I attempt either one of these, I get the following error:
'Error authenticating with the refresh token due to: expired access/refresh token'
If I had to guess this has to do with me not having a proper connected app set up in my sandbox, but I'm not sure what step to take other than authorizing the org through SFDX. What am I missing?