@abtnode/auth 1.16.46-beta-20250703-050038-4ba2582f → 1.16.46-beta-20250706-075512-de1b046b

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/lib/auth.js CHANGED
@@ -213,9 +213,10 @@ const messages = {
213
213
  */
214
214
  cannotImportFromDidSpace: (data) => getLocaleMap('cannotImportFromDidSpace', data),
215
215
 
216
- destroyMyself: (data) => getLocaleMap('destroyMyself', data),
216
+ destroySelf: (data) => getLocaleMap('destroyMyself', data),
217
217
  userNotExist: (data) => getLocaleMap('userNotExist', data),
218
218
  notAllowedToDelete: (data) => getLocaleMap('notAllowedToDelete', data),
219
+ notAllowedToDeleteOwner: (data) => getLocaleMap('notAllowedToDeleteOwner', data),
219
220
  };
220
221
 
221
222
  const PASSPORT_STATUS_KEY = 'passport-status';
package/lib/passkey.js CHANGED
@@ -37,10 +37,12 @@ const PASSKEY_ACTIONS = {
37
37
  'verify-destroy': 'verify-destroy', // destroy session with passkey
38
38
  'connect-to-did-space': 'connect-to-did-space', // connect to did space
39
39
  'connect-to-did-domain': 'connect-to-did-domain', // connect to did domain
40
+ 'destroy-self': 'destroy-self', // destroy myself with passkey
40
41
  };
41
42
 
42
43
  const shouldVerifyUser = (action) =>
43
- !process.env.ABT_NODE_NO_PASSKEY_USER_VERIFY && ['verify-elevated', 'verify-destroy', 'disconnect'].includes(action);
44
+ !process.env.ABT_NODE_NO_PASSKEY_USER_VERIFY &&
45
+ ['verify-elevated', 'verify-destroy', 'disconnect', 'destroy-self'].includes(action);
44
46
 
45
47
  const isRegisterAction = (action) => ['register', 'connect-owner'].includes(action);
46
48
 
@@ -733,14 +735,14 @@ function createPasskeyHandlers(node, mode, createToken) {
733
735
  logger.info('passkey.auth.invited', { teamDid, userDid: updated.did });
734
736
  }
735
737
 
736
- if (passkeySession.data.action === 'verify-destroy') {
738
+ if (['verify-destroy', 'destroy-self'].includes(passkeySession.data.action)) {
737
739
  const parsed = JSON.parse(fromBase64(req.passkeySession.data.payload).toString());
738
740
  const destroySession = await node.startSession({ data: { ...parsed, type: 'destroy', operator: user.did } });
739
741
  result.destroySessionId = destroySession.id;
740
742
  logger.info('passkey.auth.verifyDestroy', { teamDid, userDid: user.did, destroySessionId: destroySession.id });
741
743
  }
742
744
 
743
- if (passkeySession.data.action === 'verify-elevated' || passkeySession.data.action === 'verify-destroy') {
745
+ if (['verify-elevated', 'verify-destroy', 'destroy-self'].includes(passkeySession.data.action)) {
744
746
  await loginUser();
745
747
 
746
748
  const elevated =
package/locales/ar.js CHANGED
@@ -88,4 +88,5 @@ module.exports = {
88
88
  destroyMyself: 'أكد حذف بياناتك الشخصية، ملاحظة: حذف البيانات لا يمكن استعادته!',
89
89
  userNotExist: 'المستخدم {did} غير موجود',
90
90
  notAllowedToDelete: 'لا يُسمح لك بحذف المستخدم {did}.',
91
+ notAllowedToDeleteOwner: 'لا يُسمح لك بحذف مالك هذا التطبيق',
91
92
  };
package/locales/de.js CHANGED
@@ -89,4 +89,5 @@ module.exports = {
89
89
  'Bestätige die Löschung deiner persönlichen Daten. Hinweis: Die Datenlöschung ist nicht rückgängig zu machen!',
90
90
  userNotExist: 'Benutzer {did} existiert nicht',
91
91
  notAllowedToDelete: 'Das Löschen des Benutzers {did} ist nicht erlaubt.',
92
+ notAllowedToDeleteOwner: 'Du darfst den Besitzer dieser Anwendung nicht löschen',
92
93
  };
package/locales/en.js CHANGED
@@ -88,4 +88,5 @@ module.exports = {
88
88
  destroyMyself: 'Confirm to delete your personal data, note: data deletion is not recoverable!',
89
89
  userNotExist: 'User {did} does not exist',
90
90
  notAllowedToDelete: 'You are not allowed to delete user {did}',
91
+ notAllowedToDeleteOwner: 'You are not allowed to delete the owner of this application',
91
92
  };
package/locales/es.js CHANGED
@@ -88,4 +88,5 @@ module.exports = {
88
88
  destroyMyself: 'Confirmar para eliminar sus datos personales, nota: ¡la eliminación de datos no es recuperable!',
89
89
  userNotExist: 'Usuario {did} no existe',
90
90
  notAllowedToDelete: 'No se permite eliminar al usuario {did}',
91
+ notAllowedToDeleteOwner: 'No se permite eliminar al propietario de esta aplicación',
91
92
  };
package/locales/fr.js CHANGED
@@ -90,4 +90,5 @@ module.exports = {
90
90
  'Confirmez la suppression de vos données personnelles. Note : la suppression des données est irréversible !',
91
91
  userNotExist: "L'utilisateur {did} n'existe pas",
92
92
  notAllowedToDelete: "Vous n'êtes pas autorisé à supprimer l'utilisateur {did}.",
93
+ notAllowedToDeleteOwner: "Vous n'êtes pas autorisé à supprimer le propriétaire de cette application",
93
94
  };
package/locales/hi.js CHANGED
@@ -88,4 +88,5 @@ module.exports = {
88
88
  destroyMyself: 'अपने व्यक्तिगत डेटा को हटाने की पुष्टि करें, ध्यान दें: डेटा हटाना पूर्ववत नहीं किया जा सकता!',
89
89
  userNotExist: 'प्रयोगकर्ता {did} मौजूद नहीं है',
90
90
  notAllowedToDelete: 'आप उपयोगकर्ता {did} को हटा नहीं सकते।',
91
+ notAllowedToDeleteOwner: 'आप इस एप्लिकेशन के स्वामी को हटा नहीं सकते',
91
92
  };
package/locales/i18n.db CHANGED
Binary file
package/locales/id.js CHANGED
@@ -88,4 +88,5 @@ module.exports = {
88
88
  destroyMyself: 'Konfirmasi untuk menghapus data pribadi Anda, catatan: penghapusan data tidak dapat dipulihkan!',
89
89
  userNotExist: 'Pengguna {did} tidak ada',
90
90
  notAllowedToDelete: 'Anda tidak diizinkan untuk menghapus pengguna {did}',
91
+ notAllowedToDeleteOwner: 'Anda tidak diizinkan untuk menghapus pemilik aplikasi ini',
91
92
  };
package/locales/ja.js CHANGED
@@ -88,4 +88,5 @@ module.exports = {
88
88
  destroyMyself: '個人データの削除を確認します。注意:データ削除は復元できません!',
89
89
  userNotExist: 'ユーザー {did} は存在しません',
90
90
  notAllowedToDelete: 'ユーザー {did} を削除することはできません',
91
+ notAllowedToDeleteOwner: 'このアプリケーションの所有者を削除することはできません',
91
92
  };
package/locales/ko.js CHANGED
@@ -88,4 +88,5 @@ module.exports = {
88
88
  destroyMyself: '개인 데이터 삭제를 확인합니다. 참고: 데이터 삭제는 복구할 수 없습니다!',
89
89
  userNotExist: '사용자 {did} 가 존재하지 않습니다',
90
90
  notAllowedToDelete: '사용자 {did}를 삭제할 수 없습니다',
91
+ notAllowedToDeleteOwner: '이 애플리케이션의 소유자를 삭제할 수 없습니다',
91
92
  };
package/locales/pt.js CHANGED
@@ -88,4 +88,5 @@ module.exports = {
88
88
  destroyMyself: 'Confirmar a eliminação dos seus dados pessoais, nota: a eliminação de dados não é recuperável!',
89
89
  userNotExist: 'Usuário {did} não existe',
90
90
  notAllowedToDelete: 'Não é permitido apagar o utilizador {did}',
91
+ notAllowedToDeleteOwner: 'Você não pode excluir o dono deste aplicativo',
91
92
  };
package/locales/ru.js CHANGED
@@ -88,4 +88,5 @@ module.exports = {
88
88
  destroyMyself: 'Подтвердите удаление ваших личных данных. Примечание: удаление данных необратимо!',
89
89
  userNotExist: 'Пользователь {did} не существует',
90
90
  notAllowedToDelete: 'Вам не разрешено удалять пользователя {did}.',
91
+ notAllowedToDeleteOwner: 'Вам не разрешено удалять владельца этого приложения',
91
92
  };
package/locales/th.js CHANGED
@@ -88,4 +88,5 @@ module.exports = {
88
88
  destroyMyself: 'ยืนยันการลบข้อมูลส่วนบุคคลของคุณ หมายเหตุ: การลบข้อมูลไม่สามารถกู้คืนได้!',
89
89
  userNotExist: 'ผู้ใช้ {did} ไม่มีอยู่',
90
90
  notAllowedToDelete: 'คุณไม่ได้รับอนุญาตให้ลบผู้ใช้ {did}',
91
+ notAllowedToDeleteOwner: 'คุณไม่สามารถลบเจ้าของแอปพลิเคชันนี้ได้',
91
92
  };
package/locales/vi.js CHANGED
@@ -88,4 +88,5 @@ module.exports = {
88
88
  destroyMyself: 'Xác nhận xóa dữ liệu cá nhân của bạn, lưu ý: việc xóa dữ liệu không thể khôi phục!',
89
89
  userNotExist: 'Người dùng {did} không tồn tại',
90
90
  notAllowedToDelete: 'Bạn không được phép xóa người dùng {did}',
91
+ notAllowedToDeleteOwner: 'Bạn không được phép xóa chủ sở hữu của ứng dụng này',
91
92
  };
package/locales/zh-tw.js CHANGED
@@ -86,4 +86,5 @@ module.exports = {
86
86
  destroyMyself: '確認刪除您的個人資料,注意:資料刪除不可恢復!',
87
87
  userNotExist: '使用者 {did} 不存在',
88
88
  notAllowedToDelete: '不允許刪除用戶 {did}',
89
+ notAllowedToDeleteOwner: '您不允許刪除此應用程式的擁有者',
89
90
  };
package/locales/zh.js CHANGED
@@ -86,4 +86,5 @@ module.exports = {
86
86
  destroyMyself: '确认删除您的个人数据,注意:数据删除后将无法恢复!',
87
87
  userNotExist: '用户 {did} 不存在',
88
88
  notAllowedToDelete: '您无权删除此用户 {did}',
89
+ notAllowedToDeleteOwner: '您无权删除应用的所有者',
89
90
  };
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.16.46-beta-20250703-050038-4ba2582f",
6
+ "version": "1.16.46-beta-20250706-075512-de1b046b",
7
7
  "description": "Simple lib to manage auth in ABT Node",
8
8
  "main": "lib/index.js",
9
9
  "files": [
@@ -20,25 +20,25 @@
20
20
  "author": "linchen <linchen1987@foxmail.com> (http://github.com/linchen1987)",
21
21
  "license": "Apache-2.0",
22
22
  "dependencies": {
23
- "@abtnode/constant": "1.16.46-beta-20250703-050038-4ba2582f",
24
- "@abtnode/logger": "1.16.46-beta-20250703-050038-4ba2582f",
25
- "@abtnode/util": "1.16.46-beta-20250703-050038-4ba2582f",
26
- "@arcblock/did": "1.20.14",
27
- "@arcblock/did-auth": "1.20.14",
28
- "@arcblock/did-ext": "1.20.14",
29
- "@arcblock/did-util": "1.20.14",
30
- "@arcblock/jwt": "1.20.14",
31
- "@arcblock/nft-display": "^2.13.70",
32
- "@arcblock/validator": "1.20.14",
33
- "@arcblock/vc": "1.20.14",
34
- "@blocklet/constant": "1.16.46-beta-20250703-050038-4ba2582f",
23
+ "@abtnode/constant": "1.16.46-beta-20250706-075512-de1b046b",
24
+ "@abtnode/logger": "1.16.46-beta-20250706-075512-de1b046b",
25
+ "@abtnode/util": "1.16.46-beta-20250706-075512-de1b046b",
26
+ "@arcblock/did": "1.20.15",
27
+ "@arcblock/did-auth": "1.20.15",
28
+ "@arcblock/did-ext": "1.20.15",
29
+ "@arcblock/did-util": "1.20.15",
30
+ "@arcblock/jwt": "1.20.15",
31
+ "@arcblock/nft-display": "^3.0.19",
32
+ "@arcblock/validator": "1.20.15",
33
+ "@arcblock/vc": "1.20.15",
34
+ "@blocklet/constant": "1.16.46-beta-20250706-075512-de1b046b",
35
35
  "@blocklet/error": "^0.2.5",
36
- "@blocklet/meta": "1.16.46-beta-20250703-050038-4ba2582f",
37
- "@blocklet/sdk": "1.16.46-beta-20250703-050038-4ba2582f",
38
- "@ocap/client": "1.20.14",
39
- "@ocap/mcrypto": "1.20.14",
40
- "@ocap/util": "1.20.14",
41
- "@ocap/wallet": "1.20.14",
36
+ "@blocklet/meta": "1.16.46-beta-20250706-075512-de1b046b",
37
+ "@blocklet/sdk": "1.16.46-beta-20250706-075512-de1b046b",
38
+ "@ocap/client": "1.20.15",
39
+ "@ocap/mcrypto": "1.20.15",
40
+ "@ocap/util": "1.20.15",
41
+ "@ocap/wallet": "1.20.15",
42
42
  "@simplewebauthn/server": "^13.1.1",
43
43
  "axios": "^1.7.9",
44
44
  "flat": "^5.0.2",
@@ -56,5 +56,5 @@
56
56
  "devDependencies": {
57
57
  "jest": "^29.7.0"
58
58
  },
59
- "gitHead": "8d7838277e51ecabae489db51937f6deb51e015f"
59
+ "gitHead": "e6d80405142a38be22341a684229625361be7293"
60
60
  }