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_in value of 0 #284

Closed
wants to merge 1 commit into from

Conversation

neumachen
Copy link

@neumachen neumachen commented Dec 30, 2016

👨 🐻 🐷

If expires_in has a value of 0, expires_at gets set. This shouldn't be the case.

Use case:
VKontakte returns a 0 value for expires_in for offline access, see https://vk.com/dev/permissions.

@coveralls
Copy link

coveralls commented Dec 30, 2016

Coverage Status

Coverage increased (+0.01%) to 95.87% when pulling 7b1d7a1 on magicalbanana:expires-in-fix into e51cd0a on intridea:master.

@coveralls
Copy link

coveralls commented Dec 30, 2016

Coverage Status

Coverage increased (+0.01%) to 95.87% when pulling 571b52e on magicalbanana:expires-in-fix into e51cd0a on intridea:master.

@josephpage
Copy link
Member

Following the RFC, a 0 value in expires_in means the access_token expires as soon as emitted, and not valid forever.

https://tools.ietf.org/html/rfc6749#section-4.2.2

The lifetime in seconds of the access token. For
example, the value "3600" denotes that the access token will
expire in one hour from the time the response was generated.
If omitted, the authorization server SHOULD provide the
expiration time via other means or document the default value.

@pboling
Copy link
Member

pboling commented Jan 8, 2018

Agree with @josephpage , this can be closed. For offline access you might need to set a very long expiry.

@pboling pboling closed this Jan 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants