@hienlh/ppm 0.8.44 → 0.8.45
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/CHANGELOG.md +5 -0
- package/package.json +1 -1
- package/src/services/account.service.ts +1 -4
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -581,7 +581,7 @@ class AccountService {
|
|
|
581
581
|
/**
|
|
582
582
|
* Export accounts backup.
|
|
583
583
|
* @param includeRefreshToken - if true, includes refresh tokens (full transfer).
|
|
584
|
-
* Source
|
|
584
|
+
* Source keeps its refresh token; it will be auto-cleared if it becomes invalid.
|
|
585
585
|
* Default false = temporary export (access-only, ~1h).
|
|
586
586
|
*/
|
|
587
587
|
exportEncrypted(password: string, accountIds?: string[], includeRefreshToken = false): string {
|
|
@@ -594,9 +594,6 @@ class AccountService {
|
|
|
594
594
|
if (includeRefreshToken) {
|
|
595
595
|
let refreshToken = row.refresh_token;
|
|
596
596
|
try { refreshToken = decrypt(refreshToken); } catch { /* already plaintext or corrupt */ }
|
|
597
|
-
// Clear refresh token on source machine — accounts become temporary
|
|
598
|
-
updateAccount(row.id, { refresh_token: encrypt("") });
|
|
599
|
-
console.log(`[accounts] Full transfer: cleared refresh token for ${row.email ?? row.id} (now temporary on this machine)`);
|
|
600
597
|
return { ...row, access_token: accessToken, refresh_token: refreshToken };
|
|
601
598
|
}
|
|
602
599
|
return { ...row, access_token: accessToken, refresh_token: "" };
|