Giter Club home page Giter Club logo

Comments (7)

MattiasNilsson avatar MattiasNilsson commented on August 18, 2024 1

@dahaupt Thanks for the thorough research! I will look into this today 👍

from pxa_social_feed.

MattiasNilsson avatar MattiasNilsson commented on August 18, 2024 1

@dahaupt Good to hear! What will happen now is that every time the long-lived access token is used it gets refreshed. So no need for worrying about the data expiration.

from pxa_social_feed.

dahaupt avatar dahaupt commented on August 18, 2024 1

@MattiasNilsson That is a great improvement! 👍

from pxa_social_feed.

dahaupt avatar dahaupt commented on August 18, 2024

@MattiasNilsson Thanks for your fast response and patch!

Unfortunately, the patch does not fix the issue in my case. The response I get from the Facebook API misses the expires_in value for the long-lived access token:

Example response:

{
    "access_token":"xxxx",
    "token_type":"bearer"
}

Therefore, the hasExpired() check in Classes/Domain/Model/Token.php line 293 throws the mentioned error.

I found this stackoverflow question for the same issue, without any helpful answers, yet.

from pxa_social_feed.

dahaupt avatar dahaupt commented on August 18, 2024

Output of the Access Token Debugger of Facebook:
Type: User
Issued: 1603663895 (about a year ago)
Expires: Never
Data Access Expires: 1649535799 (in about 3 months)

If an expires_in field is not returned, it is safe to assume that it is a non-expiring token
(source)

So I guess we can not use the hasExpired() within isValidFacebookAccessToken().

from pxa_social_feed.

MattiasNilsson avatar MattiasNilsson commented on August 18, 2024

@dahaupt A new release have been done, can you verify that it works? https://github.com/pixelant/pxa_social_feed/releases/tag/3.0.3

from pxa_social_feed.

dahaupt avatar dahaupt commented on August 18, 2024

@MattiasNilsson It is working now. Thanks a lot! 🚀

If I understand the changed code correctly, it will always get a new long-lived access token. Is token expiration still a thing?

Furthermore, I noticed the data expiration of our long-lived token is 90 instead of 60 days. But as the docs state it is 60 days, we should not change it.

from pxa_social_feed.

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.