Mailspring/packages/isomorphic-core
Karim Hamidou 01318370d4 [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
2017-04-06 18:57:16 -07:00
..
spec [client-sync] Don't handle IMAP timeouts in the connection pool 2017-03-23 11:33:53 -07:00
src [cloud-workers] [send-later] Fix send later token expiration 2017-04-06 18:57:16 -07:00
index.js [cloud-*] Switch MySQL charset to utf8mb4 2017-04-06 16:25:09 -07:00
package.json [*] Revamp SSL options (including user-facing) 2017-04-05 17:49:43 -07:00
README.md [*] update and add READMEs to each package 2017-02-17 17:28:09 -08:00

Isomorphic Core

Isomorphic refers to javascript that can be run on both the client and the server.

This is shared code for mail and utilities that is designed to run both on deployed cloud servers and from within the Nylas Mail client.

Use through a regular import: import iso-core from 'isomorphic-core'

It is required as a dependency in the package.json of other modules.

This library isn't on the npm registry, but works as a dependency thanks to lerna bootstrap

See index.js for what gets explicitly exported by this library.

Important Usage Notes:

Since this code runs in both the client and the server, you must be careful with what libraries you use. Some common gotchas:

  • You can't use NylasEnv or NylasExports. These are injected only in the client.
  • If you require a 3rd party library, it must be added to the "dependencies" of isomorphic-core's package.json
  • You may use modern javascript syntax. Both the client and server get compiled with the same .babelrc setting