ondrej1024/carelink-python-client

Reuse auth_cookie instead of relogin

Closed this issue · 4 comments

Will the reuse of auth_cookie be more efficient than repeated logins? Looks like the cookie has an hour lifetime and getting refreshed on use.

I don't know but you could try this and check if it works.

I am exploring this idea on the java client here: benceszasz/CareLinkJavaClient#4

Started by saving cookies to file system. Then looking at how nightscout uses this:
var CARELINKEU_REFRESH_TOKEN_URL = 'https://' + carelinkServerAddress + '/patient/sso/reauth';

Closing this issue as the token refresh procedure is now implemented. Saving of the tokens to permanent storage will be done together with the implementation of the new Carelink Connect app API.

Closing