@mu-cabin/muc-cli 0.5.4 → 0.5.5
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/REFERENCE.md +3 -1
- package/dist/muc.mjs +6 -4
- package/package.json +1 -1
package/REFERENCE.md
CHANGED
|
@@ -353,7 +353,9 @@ as the personal `~/.muc` account and is mutually exclusive with
|
|
|
353
353
|
separate iPad slot, so desktop and phone coexist; a real iPad may conflict.
|
|
354
354
|
- **REST `tokenPwd`.** A fresh `muc login` rotates the account's refresh
|
|
355
355
|
token; other devices on that account get logged out when their token
|
|
356
|
-
next refreshes.
|
|
356
|
+
next refreshes. Remembered-password daemon recovery is different: it uses
|
|
357
|
+
`createTokenPwd=false`, refreshing only accessToken and preserving the
|
|
358
|
+
phone's auto-login credential.
|
|
357
359
|
|
|
358
360
|
The fix is to give the daemon its **own account**, stored under
|
|
359
361
|
`~/.muc/assistant/` (next to its pid / socket / logs) and completely
|
package/dist/muc.mjs
CHANGED
|
@@ -22296,8 +22296,8 @@ async function doRefreshViaRememberedPwd() {
|
|
|
22296
22296
|
deviceName: cred.deviceName || getDeviceName(),
|
|
22297
22297
|
passwordType: 0,
|
|
22298
22298
|
// plaintext password (DES-encoded), not tokenPwd
|
|
22299
|
-
createTokenPwd:
|
|
22300
|
-
//
|
|
22299
|
+
createTokenPwd: false,
|
|
22300
|
+
// accessToken only; do not rotate phone auto-login
|
|
22301
22301
|
encrypt: true
|
|
22302
22302
|
};
|
|
22303
22303
|
form.sign = signRest(form, cfg.signSecretRest);
|
|
@@ -24052,13 +24052,15 @@ async function tryRefreshViaEmpGet2(cred, cfg) {
|
|
|
24052
24052
|
}
|
|
24053
24053
|
}
|
|
24054
24054
|
async function refreshAccessTokenViaTokenPwd(cred, cfg) {
|
|
24055
|
+
const platform3 = DEFAULT_REST_PLATFORM;
|
|
24056
|
+
const appVersion = platform3 === PLATFORM_IOS ? APP_VERSION_IOS : APP_VERSION;
|
|
24055
24057
|
const form = {
|
|
24056
24058
|
account: cred.uid,
|
|
24057
24059
|
password: encryptPassword(cred.tokenPwd, pwdDesKeyOf(cfg)),
|
|
24058
24060
|
appName: APP_NAME,
|
|
24059
24061
|
appKey: cfg.appKey,
|
|
24060
|
-
appVersion
|
|
24061
|
-
platform:
|
|
24062
|
+
appVersion,
|
|
24063
|
+
platform: platform3,
|
|
24062
24064
|
osVersion: release3(),
|
|
24063
24065
|
deviceId: cred.deviceId,
|
|
24064
24066
|
deviceName: cred.deviceName,
|