-
Notifications
You must be signed in to change notification settings - Fork 55
Closed
Description
I'm submitting a...
[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Other... Please describe:
Expected Behavior
I expect that, ASK_REFRESH_TOKEN, ASK_ACCESS_TOKEN, ASK_VENDOR_ID environment variables, if defined, take precedence over the values in the cli_config file.
Current Behavior
- without
cli_configit simply crashes - with a
cli_configwith invalidaccess_tokenandrefresh_tokenit correctly displays "Token is invalid/expired." - even when setting the correct environment variables,
askstill uses the values from thecli_configfile
ASK_DEFAULT_PROFILE=default
ASK_ACCESS_TOKEN="Atza|IwEBIDef..."
ASK_REFRESH_TOKEN="Atzr|IwEBICM..."
ASK_VENDOR_ID="M2C.."
Steps to Reproduce (for bugs)
# set valid credentials via ENV
export ASK_DEFAULT_PROFILE=default
export ASK_ACCESS_TOKEN="Atza|IwEBIDef..."
export ASK_REFRESH_TOKEN="Atzr|IwEBICM..."
export ASK_VENDOR_ID="M2C.."
# edit your `cli_config` and edit `access_token` and `refresh_token` to become invalid
ask dialog --debug --replay mySkill.replay
[...]
Request headers: {"authorization":"Atza|IwEBIPE..." ...
# notice that the token used in the request is NOT the one provided via ENV
Possible Solution
Check why ENV is not working
- if ENV is given and there is no
cli_configfile, it should be created - if ENV is given, it should always take precedence
Your Environment and Context
- ask-cli version: 2.24.1
- Operating System and version: macOS Big Sur (arm64)
- Node.js version used for development: v16.8.0
- NPM version used for development: 7.21.0
galah92 and jrglg
Metadata
Metadata
Assignees
Labels
No labels