Giter VIP home page Giter VIP logo

Comments (4)

micahdlamb avatar micahdlamb commented on August 23, 2024

I hope that makes sense... I'd be happy to do a pull request. In order to do that I need to know if there is some other usecase HttpClient.get_bearer_info is handling (besides refreshing the token) or is the function just broken.

from spotify.py.

micahdlamb avatar micahdlamb commented on August 23, 2024

I created a commit here to explain what I'm trying to say.
micahdlamb@2a62f22

This seems like a better way to handle the token refreshing. Its a lot simpler and doesn't continually refresh the token when I hold onto User objects for a long time.

I'm not making a pull request as there are api breaking changes and I'm not sure how you would want to handle that. Let me know what you think...

from spotify.py.

mental32 avatar mental32 commented on August 23, 2024

Nice catch!

I was under the impression that refresh tokens expired after some time, but I just checked the Spotify web API guides and I see no mention of this.

This is certainly a much cleaner solution to handling User access token refreshing.

I'm not making a pull request as there are api breaking changes and I'm not sure how you would want to handle that. Let me know what you think...

The library is semantically versioned and currently it hasn't reached major revision one yet (its still at major zero) so breaking changes are perfectly fine until then.

Would you like to PR this in?
I'll likely do it tomorrow otherwise :)

from spotify.py.

micahdlamb avatar micahdlamb commented on August 23, 2024

Great! I'll try to make a pull request tonight.

from spotify.py.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.