Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow expires_at to be a UNIX timestamp #277

Merged

Commits on Nov 17, 2019

  1. Allow expires_at to be a UNIX timestamp

    This library currently only handles expires_at properties well when they
    are provided in ISOString representation.
    
    Unlike the expires_in field, the expires_at is not part of the OAuth2
    spec, so implementations may vary.
    
    Some APIs like the Strava API use a UNIX timestamp (seconds since epoch)
    in the expires_at field:
    http://developers.strava.com/docs/authentication/#response-parameters-1
    
    Token refresh will yield "Invalid Date" in the expires_at field when
    only accepting an ISOString.
    
    This patch checks if expires_at is a number and if so assumes it is a
    UNIX timestamp (seconds since epoch).
    ctavan committed Nov 17, 2019
    Configuration menu
    Copy the full SHA
    ef411d1 View commit details
    Browse the repository at this point in the history