Skip to content

Conversation

@theacodes
Copy link
Contributor

@theacodes theacodes commented May 5, 2017

Previously, the clock skew adjusted in the wrong direction. It would cause us to consider credentials whose expiration time had already passed according to the system clock to still be sent to the server. This is the opposite of what we wanted to happen. This fixes it so that we report that credentials are expired slightly before the system clock thinks they've expired.

Previously, the clock skew adjusted in the wrong direction. It would cause us to consider credentials whose expiration time had already pass according to the system clock to still be sent to the server. This is the opposite of what we wanted to happen. This fixes it so that we report that credentials are expired slightly before the system clock thinks they've expired.
# Err on the side of reporting expiration early so that we avoid
# the 403-refresh-retry loop.
adjusted_now = _helpers.utcnow() - _helpers.CLOCK_SKEW
adjusted_now = _helpers.utcnow() + _helpers.CLOCK_SKEW

This comment was marked as spam.

This comment was marked as spam.

Jon Wayne Parrott added 2 commits May 8, 2017 09:31
Copy link
Contributor

@dhermes dhermes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@theacodes theacodes merged commit 7af9f66 into master May 8, 2017
@theacodes theacodes deleted the jon-is-a-big-dumb-dumb branch May 8, 2017 16:40
tamakisquare added a commit to tamakisquare/Pyrebase that referenced this pull request Jun 1, 2017
This library was impacted by a bug in "google-auth" v1.0.0, which is fixed in v1.0.1
googleapis/google-auth-library-python#158

This commit is for adopting "google-auth" v1.0.1 and also removing the code
that was intended as a workaround to the bug.
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.

3 participants