In the FAQ it says:
Instead of logging in every time, cache the authentication token and reuse it on subsequent runs. See here for an example implementation.
-
The "here" example points to line numbers that don't appear to be relevant any longer on the master branch.
-
The place I'm guessing was meant is the if not logged_in and token section. but this only saves the master token, not the auth token. So one cannot pass this between invocations of a script that keeps trying to sync, to avoid having to login every time. Maybe we could pass the auth token to .authenticate() method?
I wonder if it would be a good idea to keep the auth token (not the master token) in the serialized data? This way the application could resume where it left off until the token expired, with no re-login needed. We can already pass the serialized Keep data between invocations to reduce sync cost, but this doesn't work for the login.
In the FAQ it says:
The "here" example points to line numbers that don't appear to be relevant any longer on the master branch.
The place I'm guessing was meant is the
if not logged_in and tokensection. but this only saves the master token, not the auth token. So one cannot pass this between invocations of a script that keeps trying to sync, to avoid having to login every time. Maybe we could pass the auth token to.authenticate()method?I wonder if it would be a good idea to keep the auth token (not the master token) in the serialized data? This way the application could resume where it left off until the token expired, with no re-login needed. We can already pass the serialized Keep data between invocations to reduce sync cost, but this doesn't work for the login.