tamland / python-tidal

Python API for TIDAL music streaming service
GNU Lesser General Public License v3.0
413 stars 110 forks source link

Investigate if token expiry is handled correctly #189

Closed tehkillerbee closed 1 year ago

tehkillerbee commented 1 year ago

tidalapi provides the necessary framework to update the session token here. However, this is never called by load_oauth_session(), even though the function description indicates that this here

It would make sense if refresh_token() is called automatically when necessary. Ideally, the refresh token should be used when the session expires, and the json file should then be updated automatically.

Originally posted by @tehkillerbee in https://github.com/tamland/python-tidal/issues/63#issuecomment-1696875538

tehkillerbee commented 1 year ago

I remember an issue about this from way back. After looking further into this, it looks like we indeed refresh the token if necessary for each request() so that explains why everything works as expected.: https://github.com/tamland/python-tidal/commit/ee120d94d897f6f6ee644fd835a35fb68942b331

tehkillerbee commented 1 year ago

Closing this issue, as token expiry is indeed handled correctly.