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

fix(gmail) token expiry calculation is wrong #2381

Merged
merged 1 commit into from
Sep 22, 2022

Conversation

marwoodandrew
Copy link
Contributor

I'm surprised no one else seems to have this problem!

We get a timestamp time from google and save it in expires_at as time zone naïve in the oauth2_token collection, using datetime.fromtimestamp with tz parameter so it returns local time naïve.

It is assumed by mongo to be UTC.

When we retrieve it in timezone UTC+10 the expires_at is effectively well in the future so don't refresh the token when required.

So now we just treat it as timezone naïve when testing if near expiry.

@petrjasek petrjasek added this to the 2.5 milestone Sep 16, 2022
@petrjasek
Copy link
Member

might be because our servers are close to utc timezone (only +1 or +2)

@petrjasek petrjasek merged commit bf1a30c into superdesk:release/2.5 Sep 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants