@mega-yfue/eufy-sdk 0.5.0-beta.55 → 0.5.0-beta.57
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/index.js +15 -5
- package/dist/index.js.map +2 -2
- package/dist/transport/http/mega-client.d.ts +6 -1
- package/package.json +1 -1
|
@@ -230,6 +230,8 @@ export declare class MegaHttpClient {
|
|
|
230
230
|
/** True while a 2FA code is outstanding: `auth_` holds only the limited pre-verify token, so the
|
|
231
231
|
* restored-session short-circuit must NOT treat it as a usable session. Cleared on Ok/reset. */
|
|
232
232
|
private pending2fa;
|
|
233
|
+
/** An autonomous re-login answered captcha/2FA; see {@link canReauthenticate}. */
|
|
234
|
+
private reloginChallenged;
|
|
233
235
|
private tokenExpiresAt;
|
|
234
236
|
/**
|
|
235
237
|
* Stable per-install device id: `openudid` as configured, as restored from the session store, or as
|
|
@@ -265,6 +267,7 @@ export declare class MegaHttpClient {
|
|
|
265
267
|
*
|
|
266
268
|
* Read at construction, and again when a rejection is being recovered from — a store SHARED with another
|
|
267
269
|
* client may already hold the session that client obtained, which is cheaper to adopt than to compete with.
|
|
270
|
+
* An adopted session is a complete one, so it ends any 2FA or challenged re-login this client was left with.
|
|
268
271
|
*
|
|
269
272
|
* Note: the device identity (openudid + phone model + media UA) is NOT restored here — it is resolved once
|
|
270
273
|
* in the constructor, where an explicit config wins over the stored value, and must not be re-derived from a
|
|
@@ -589,7 +592,9 @@ export declare class MegaHttpClient {
|
|
|
589
592
|
* Structural rather than a list of paths: a login round trip is itself an authenticated call while a limited
|
|
590
593
|
* token is held, so re-logging in from inside one would recurse — and a path list would have to be
|
|
591
594
|
* maintained alongside every request the login flow makes. A 2FA code already outstanding is a login a human
|
|
592
|
-
* is part-way through, and restarting it silently would discard it.
|
|
595
|
+
* is part-way through, and restarting it silently would discard it. A re-login that already came back needing
|
|
596
|
+
* a captcha or a 2FA code would need the same again, and each attempt sends the account another code, so
|
|
597
|
+
* none is tried until a login completes or a stored session is adopted. No credentials means nothing to try,
|
|
593
598
|
* so the rejection surfaces instead.
|
|
594
599
|
*/
|
|
595
600
|
private canReauthenticate;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mega-yfue/eufy-sdk",
|
|
3
|
-
"version": "0.5.0-beta.
|
|
3
|
+
"version": "0.5.0-beta.57",
|
|
4
4
|
"description": "One typed TypeScript client for the Anker eufy v6 cloud — capability-driven devices, realtime events over P2P/MQTT/push, and live media",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "mega-yfue",
|