@open-webapp/drive-sync 0.5.1 → 0.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/token.js +4 -1
- package/package.json +1 -1
package/dist/token.js
CHANGED
|
@@ -5,8 +5,11 @@ import { createBroadcast } from './broadcast.js';
|
|
|
5
5
|
/**
|
|
6
6
|
* How long to wait, after GIS reports `popup_closed`, for the success
|
|
7
7
|
* `callback` to still win the race before treating it as a real failure.
|
|
8
|
+
* 300ms proved too tight in production: on a real network round-trip the
|
|
9
|
+
* success token can arrive well after GIS's popup-closed poll fires,
|
|
10
|
+
* causing genuinely successful sign-ins to be reported as NeedsReauthError.
|
|
8
11
|
*/
|
|
9
|
-
const POPUP_CLOSED_GRACE_MS =
|
|
12
|
+
const POPUP_CLOSED_GRACE_MS = 2000;
|
|
10
13
|
/**
|
|
11
14
|
* Persists a freshly-acquired GIS token response as a StoredToken, deriving
|
|
12
15
|
* expiresAt from the response's own expires_in (never hardcoded) and
|