mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-11 02:30:21 +08:00
[cloud-workers] [send-later] Fix send later token expiration
Summary: Fixes T8076. So, the Gmail OAuth API returns us an expiration time in milliseconds, but we convert it to seconds everywhere, except in the cloud-api. This caused us to never refresh tokens because we'd be comparing seconds to milliseconds. Fix this by converting the `expiry_date` from our credentials to seconds. Test Plan: Tested manually. Will do more testing tomorrow, after my credentials expire. Reviewers: evan, juan Reviewed By: evan, juan Maniphest Tasks: T8076 Differential Revision: https://phab.nylas.com/D4390
This commit is contained in:
parent
236c71ea6a
commit
01318370d4
1 changed files with 1 additions and 1 deletions
|
@ -60,7 +60,7 @@ export function googleSettings(googleToken, email) {
|
||||||
smtp_username: email,
|
smtp_username: email,
|
||||||
}, CommonProviderSettings.gmail);
|
}, CommonProviderSettings.gmail);
|
||||||
const connectionCredentials = {
|
const connectionCredentials = {
|
||||||
expiry_date: googleToken.expiry_date,
|
expiry_date: Math.floor(googleToken.expiry_date / 1000),
|
||||||
};
|
};
|
||||||
if (GMAIL_CLIENT_ID && GMAIL_CLIENT_SECRET) {
|
if (GMAIL_CLIENT_ID && GMAIL_CLIENT_SECRET) {
|
||||||
// cloud-only credentials
|
// cloud-only credentials
|
||||||
|
|
Loading…
Reference in a new issue