Not following guidelines may result in your bug being ignored and/or closed.
Description of Bug
Using client_from_manual_flow to get new token file. Due to another issue which gave me error at the login page, I entered an empty string for Redirect URL. Surprisingly this actually worked. Although by calling client_from_token_file the token file will not be refreshed and will expire in 1 hour.
The 2 questions here:
Is this normal for client_from_manual_flow to generate a valid token even without an empty string Redirect URL?
Why client_from_token_file fails to refresh the generated token file?
python: 3.11
schwab-py: 1.2.1
Code to Reproduce
step 1: in auth.py line 532, simply make redirected_url an empty string:
IMPORTANT: Remember to anonymize your code. Be sure to replace API keys/Client IDs with placeholders. Also, never, ever share the contents of your token file.
Expected Behavior
An invalid redirected_url should not produce a valid token.
client_from_token_file should refresh the token
Actual Behavior
By making redirected_url an empty string, a valid token is produced which cannot be refreshed.
Please read the bug submission guidelines before submitting a bug.
Not following guidelines may result in your bug being ignored and/or closed.
Description of Bug Using
client_from_manual_flow
to get new token file. Due to another issue which gave me error at the login page, I entered an empty string forRedirect URL
. Surprisingly this actually worked. Although by callingclient_from_token_file
the token file will not be refreshed and will expire in 1 hour. The 2 questions here: Is this normal forclient_from_manual_flow
to generate a valid token even without an empty string Redirect URL? Whyclient_from_token_file
fails to refresh the generated token file?python: 3.11 schwab-py: 1.2.1
Code to Reproduce step 1: in auth.py line 532, simply make
redirected_url
an empty string:step 2:
IMPORTANT: Remember to anonymize your code. Be sure to replace API keys/Client IDs with placeholders. Also, never, ever share the contents of your token file.
Expected Behavior An invalid redirected_url should not produce a valid token.
client_from_token_file
should refresh the tokenActual Behavior By making redirected_url an empty string, a valid token is produced which cannot be refreshed.
Error/Exception Log, If Applicable See here to learn how to turn on debug logging: https://tda-api.readthedocs.io/en/latest/help.html