-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Subsequent Auth Fails with Token #11
Comments
This code works fine BUT you must authenticate with the token first and only once. Thereafter use the cached OAuth credentials. |
I'm running into the same issue. How can we validate if the |
I admit that managing the life cycle is not intuitive. You can check my fork of this repository to see where I added some behavior that removes OAuth state caching from the file system. Also look at my Python Connection class to see how it handles the API logic. For my application I didn't want files lying around that had valid OAuth credentials. Possibly another way to do this without any modification of the API is to generate a new token and immediately delete ~/.questrade.json. Use the presence of ~/.questrade.json as a discriminant to figure out if the connection needs a token parameter. |
I would just do this:
|
Hi Tom,
Neat project. I noticed something weird. I am using a FastAPI app, in my app.py I always make a connection and instantiate the Q object (= Questrade(refresh_token='XX') ).
The first time I run the code it works fine, and a restart causes 400 bad requests. It only works if I change the refresh token from the dashboard or have Q = Questrade() (without the refresh token).
I figure this might be an issue with the API maybe.
The text was updated successfully, but these errors were encountered: