Closed bobgott closed 1 year ago
There is no logout url anymore in revised code, so in the example.py I just delete the stored tokens to simulate logout, forgot to change the api call (make it bogus/deprecated until we have or need similar solution)
@matin do you know if there is a logout endpoint in mobile api?
There is. I'll add it later today.
(@cyberjunky) so in the example.py I just delete the stored tokens to simulate logout
Thank you for the explanation. Seems like progress is being made
The mobile app only revokes the OAuth2 token. The OAuth1 token remains active for a year since login and can still be used to obtain a new, valid OAuth2 token!
In other words, not even the app revokes the OAuth1 token to fully log out of the session.
The only method I can find to invalidate the OAuth1 token is to change your password in the Account Details page and choose "Sign me out of all Garmin websites and apps".
@cyberjunky the approach of simply deleting the tokens appears to be the right one.
I marked api.logout as deprecated, example in example.py can be used to delete whole .garminconnect directory, or just delete one or two OAuth files.
I noticed that when I upgraded to release 0.2.4 the method logout() was failing in my code. I then added that logic to example.py and received the same error (I'm not sure when logout is appropriate). Below is the subsequent trace
Logging Out! ... trace