Inconsistent behavior and documentation for sf org login access-token
using the --no-prompt flag
#2574
Labels
bug
Issue or pull request that identifies or fixes a bug
investigating
We're actively investigating this issue
validated
Version information for this issue has been validated
Summary
Documentation states that for the
sf org login access-token
command:However doing this on @salesforce/cli/2.17.14 generates the following warning:
When using SF_ACCESS_TOKEN instead of SFDX_ACCESS_TOKEN, in conjunction with the --no-prompt flag, the user is still prompted to enter the access token, leading me to believe that the SF_ACCESS_TOKEN environment variable is not working as expected.
Steps To Reproduce
Reproduce Warning
$ sf org display --verbose
$ export SFDX_ACCESS_TOKEN=***
given access token from previous step$ sf org login access-token -r [url] -s --no-prompt
Reproduce issue with SF_ACCESS_TOKEN and --no-prompt
$ export SF_ACCESS_TOKEN=***
given access token$ sf org login access-token -r [url] -s --no-prompt
I verified this in two different salesforce orgs, but I first found it when authenticating in the following org in this repo: https://github.com/k-capehart/sfdc-dev-org
Expected result
Given the warning, the expected result is to not be prompted for an access token when setting the access token in the environment variable SF_ACCESS_TOKEN with the --no-prompt flag.
Actual result
The user is prompted to give the access token anyways
System Information
recreated using bash shell and zsh
sf version --verbose --json
The text was updated successfully, but these errors were encountered: