Getting sfdx "Authorize an Org" to work is very hit/miss depending on your luck/setup/etc. This is mainly just a note to myself that when you're on the last part of the auth process where you're at a locahost URL post SFDC login and you get a ERR_CONNECTION REFUSED or other error, try changing the port in the URL to 7717 or 7177 and maybe it will work. This assumes MS Defender/etc have proper firewall rules/exeptions etc in place.
(mostly here just for metadata/search indexing)
- ERR_CONNECTION_REFUSED
- OauthRedirect
- sfdx force:auth:web:login -a
- SFDX CLI
- sf org login web --alias myInstance
- https://salesforce.stackexchange.com/questions/249857/cannot-connect-a-salesforce-org-using-authorize-an-org-in-vs-code
- forcedotcom/salesforcedx-vscode#5122
- https://salesforce.stackexchange.com/questions/251589/unable-to-authorize-salesforce-org-using-sfdx-trailhead
- https://salesforce.stackexchange.com/questions/295627/sfdx-authorize-an-org-error-listen-eacces-permission-denied-127-0-0-11717
- https://salesforce.stackexchange.com/questions/251589/unable-to-authorize-salesforce-org-using-sfdx-trailhead/251988#251988
- https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007T42DWSAZ