@oxyhq/services 5.15.8 → 5.16.0

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.
Files changed (148) hide show
  1. package/lib/commonjs/core/OxyServices.js +0 -1
  2. package/lib/commonjs/core/OxyServices.js.map +1 -1
  3. package/lib/commonjs/core/mixins/OxyServices.auth.js +3 -6
  4. package/lib/commonjs/core/mixins/OxyServices.auth.js.map +1 -1
  5. package/lib/commonjs/core/mixins/OxyServices.devices.js +1 -1
  6. package/lib/commonjs/core/mixins/OxyServices.devices.js.map +1 -1
  7. package/lib/commonjs/core/mixins/index.js +11 -12
  8. package/lib/commonjs/core/mixins/index.js.map +1 -1
  9. package/lib/commonjs/crypto/signatureService.js +3 -2
  10. package/lib/commonjs/crypto/signatureService.js.map +1 -1
  11. package/lib/commonjs/i18n/locales/ar-SA.json +1 -9
  12. package/lib/commonjs/i18n/locales/ca-ES.json +1 -9
  13. package/lib/commonjs/i18n/locales/de-DE.json +1 -9
  14. package/lib/commonjs/i18n/locales/en-US.json +3 -21
  15. package/lib/commonjs/i18n/locales/es-ES.json +3 -21
  16. package/lib/commonjs/i18n/locales/fr-FR.json +1 -9
  17. package/lib/commonjs/i18n/locales/it-IT.json +1 -9
  18. package/lib/commonjs/i18n/locales/ja-JP.json +1 -9
  19. package/lib/commonjs/i18n/locales/ko-KR.json +1 -9
  20. package/lib/commonjs/i18n/locales/pt-PT.json +1 -9
  21. package/lib/commonjs/i18n/locales/zh-CN.json +1 -9
  22. package/lib/commonjs/ui/context/OxyContext.js +24 -4
  23. package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
  24. package/lib/commonjs/ui/context/hooks/useAuthOperations.js +217 -100
  25. package/lib/commonjs/ui/context/hooks/useAuthOperations.js.map +1 -1
  26. package/lib/commonjs/ui/screens/AccountSettingsScreen.js +2 -319
  27. package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -1
  28. package/lib/commonjs/ui/screens/OxyAuthScreen.js +178 -77
  29. package/lib/commonjs/ui/screens/OxyAuthScreen.js.map +1 -1
  30. package/lib/commonjs/ui/screens/PrivacySettingsScreen.js +0 -1
  31. package/lib/commonjs/ui/screens/PrivacySettingsScreen.js.map +1 -1
  32. package/lib/commonjs/ui/screens/SessionManagementScreen.js +43 -29
  33. package/lib/commonjs/ui/screens/SessionManagementScreen.js.map +1 -1
  34. package/lib/commonjs/ui/stores/authStore.js +14 -1
  35. package/lib/commonjs/ui/stores/authStore.js.map +1 -1
  36. package/lib/module/core/OxyServices.js +0 -1
  37. package/lib/module/core/OxyServices.js.map +1 -1
  38. package/lib/module/core/mixins/OxyServices.auth.js +3 -6
  39. package/lib/module/core/mixins/OxyServices.auth.js.map +1 -1
  40. package/lib/module/core/mixins/OxyServices.devices.js +1 -1
  41. package/lib/module/core/mixins/OxyServices.devices.js.map +1 -1
  42. package/lib/module/core/mixins/index.js +1 -2
  43. package/lib/module/core/mixins/index.js.map +1 -1
  44. package/lib/module/crypto/signatureService.js +3 -2
  45. package/lib/module/crypto/signatureService.js.map +1 -1
  46. package/lib/module/i18n/locales/ar-SA.json +1 -9
  47. package/lib/module/i18n/locales/ca-ES.json +1 -9
  48. package/lib/module/i18n/locales/de-DE.json +1 -9
  49. package/lib/module/i18n/locales/en-US.json +3 -21
  50. package/lib/module/i18n/locales/es-ES.json +3 -21
  51. package/lib/module/i18n/locales/fr-FR.json +1 -9
  52. package/lib/module/i18n/locales/it-IT.json +1 -9
  53. package/lib/module/i18n/locales/ja-JP.json +1 -9
  54. package/lib/module/i18n/locales/ko-KR.json +1 -9
  55. package/lib/module/i18n/locales/pt-PT.json +1 -9
  56. package/lib/module/i18n/locales/zh-CN.json +1 -9
  57. package/lib/module/ui/context/OxyContext.js +24 -4
  58. package/lib/module/ui/context/OxyContext.js.map +1 -1
  59. package/lib/module/ui/context/hooks/useAuthOperations.js +217 -100
  60. package/lib/module/ui/context/hooks/useAuthOperations.js.map +1 -1
  61. package/lib/module/ui/screens/AccountSettingsScreen.js +2 -319
  62. package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
  63. package/lib/module/ui/screens/OxyAuthScreen.js +179 -78
  64. package/lib/module/ui/screens/OxyAuthScreen.js.map +1 -1
  65. package/lib/module/ui/screens/PrivacySettingsScreen.js +0 -1
  66. package/lib/module/ui/screens/PrivacySettingsScreen.js.map +1 -1
  67. package/lib/module/ui/screens/SessionManagementScreen.js +44 -29
  68. package/lib/module/ui/screens/SessionManagementScreen.js.map +1 -1
  69. package/lib/module/ui/stores/authStore.js +14 -1
  70. package/lib/module/ui/stores/authStore.js.map +1 -1
  71. package/lib/typescript/core/OxyServices.d.ts +0 -1
  72. package/lib/typescript/core/OxyServices.d.ts.map +1 -1
  73. package/lib/typescript/core/mixins/OxyServices.auth.d.ts +3 -4
  74. package/lib/typescript/core/mixins/OxyServices.auth.d.ts.map +1 -1
  75. package/lib/typescript/core/mixins/OxyServices.devices.d.ts +1 -4
  76. package/lib/typescript/core/mixins/OxyServices.devices.d.ts.map +1 -1
  77. package/lib/typescript/core/mixins/index.d.ts +1 -64
  78. package/lib/typescript/core/mixins/index.d.ts.map +1 -1
  79. package/lib/typescript/crypto/signatureService.d.ts +2 -1
  80. package/lib/typescript/crypto/signatureService.d.ts.map +1 -1
  81. package/lib/typescript/models/interfaces.d.ts +1 -1
  82. package/lib/typescript/models/interfaces.d.ts.map +1 -1
  83. package/lib/typescript/types/bip39.d.ts +1 -0
  84. package/lib/typescript/types/buffer.d.ts +1 -0
  85. package/lib/typescript/types/color.d.ts +1 -0
  86. package/lib/typescript/types/elliptic.d.ts +1 -0
  87. package/lib/typescript/types/expo-crypto.d.ts +1 -0
  88. package/lib/typescript/types/expo-secure-store.d.ts +1 -0
  89. package/lib/typescript/ui/context/OxyContext.d.ts +11 -3
  90. package/lib/typescript/ui/context/OxyContext.d.ts.map +1 -1
  91. package/lib/typescript/ui/context/hooks/useAuthOperations.d.ts +13 -5
  92. package/lib/typescript/ui/context/hooks/useAuthOperations.d.ts.map +1 -1
  93. package/lib/typescript/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
  94. package/lib/typescript/ui/screens/OxyAuthScreen.d.ts +1 -0
  95. package/lib/typescript/ui/screens/OxyAuthScreen.d.ts.map +1 -1
  96. package/lib/typescript/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
  97. package/lib/typescript/ui/screens/SessionManagementScreen.d.ts.map +1 -1
  98. package/lib/typescript/ui/stores/authStore.d.ts +4 -0
  99. package/lib/typescript/ui/stores/authStore.d.ts.map +1 -1
  100. package/package.json +6 -5
  101. package/src/core/OxyServices.ts +0 -1
  102. package/src/core/mixins/OxyServices.auth.ts +3 -8
  103. package/src/core/mixins/OxyServices.devices.ts +1 -4
  104. package/src/core/mixins/index.ts +2 -5
  105. package/src/crypto/index.ts +1 -0
  106. package/src/crypto/keyManager.ts +1 -0
  107. package/src/crypto/polyfill.ts +1 -0
  108. package/src/crypto/recoveryPhrase.ts +1 -0
  109. package/src/crypto/signatureService.ts +4 -5
  110. package/src/i18n/locales/ar-SA.json +1 -9
  111. package/src/i18n/locales/ca-ES.json +1 -9
  112. package/src/i18n/locales/de-DE.json +1 -9
  113. package/src/i18n/locales/en-US.json +3 -21
  114. package/src/i18n/locales/es-ES.json +3 -21
  115. package/src/i18n/locales/fr-FR.json +1 -9
  116. package/src/i18n/locales/it-IT.json +1 -9
  117. package/src/i18n/locales/ja-JP.json +1 -9
  118. package/src/i18n/locales/ko-KR.json +1 -9
  119. package/src/i18n/locales/pt-PT.json +1 -9
  120. package/src/i18n/locales/zh-CN.json +1 -9
  121. package/src/models/interfaces.ts +1 -1
  122. package/src/types/bip39.d.ts +1 -0
  123. package/src/types/buffer.d.ts +1 -0
  124. package/src/types/color.d.ts +1 -0
  125. package/src/types/elliptic.d.ts +1 -0
  126. package/src/types/expo-crypto.d.ts +1 -0
  127. package/src/types/expo-secure-store.d.ts +1 -0
  128. package/src/ui/context/OxyContext.tsx +35 -3
  129. package/src/ui/context/hooks/useAuthOperations.ts +212 -98
  130. package/src/ui/screens/AccountSettingsScreen.tsx +1 -201
  131. package/src/ui/screens/OxyAuthScreen.tsx +193 -69
  132. package/src/ui/screens/PrivacySettingsScreen.tsx +0 -2
  133. package/src/ui/screens/SessionManagementScreen.tsx +43 -26
  134. package/src/ui/stores/authStore.ts +31 -2
  135. package/lib/commonjs/core/mixins/OxyServices.totp.js +0 -53
  136. package/lib/commonjs/core/mixins/OxyServices.totp.js.map +0 -1
  137. package/lib/commonjs/ui/components/profile/TwoFactorSetupModal.js +0 -467
  138. package/lib/commonjs/ui/components/profile/TwoFactorSetupModal.js.map +0 -1
  139. package/lib/module/core/mixins/OxyServices.totp.js +0 -49
  140. package/lib/module/core/mixins/OxyServices.totp.js.map +0 -1
  141. package/lib/module/ui/components/profile/TwoFactorSetupModal.js +0 -460
  142. package/lib/module/ui/components/profile/TwoFactorSetupModal.js.map +0 -1
  143. package/lib/typescript/core/mixins/OxyServices.totp.d.ts +0 -66
  144. package/lib/typescript/core/mixins/OxyServices.totp.d.ts.map +0 -1
  145. package/lib/typescript/ui/components/profile/TwoFactorSetupModal.d.ts +0 -11
  146. package/lib/typescript/ui/components/profile/TwoFactorSetupModal.d.ts.map +0 -1
  147. package/src/core/mixins/OxyServices.totp.ts +0 -36
  148. package/src/ui/components/profile/TwoFactorSetupModal.tsx +0 -442
@@ -1 +1 @@
1
- {"version":3,"file":"OxyContext.d.ts","sourceRoot":"","sources":["../../../../src/ui/context/OxyContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAQL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAK1D,OAAO,KAAK,EAAE,aAA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,CAAC;QACpB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC,CACH,CAAC;IACF,uBAAuB,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7C,gBAAgB,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACxD,WAAW,EAAE,WAAW,CAAC;IACzB,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B,eAAe,CAAC,EAAE,CAAC,cAAc,EAAE,SAAS,GAAG;QAAE,MAAM,EAAE,SAAS,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAAE,KAAK,IAAI,CAAC;CAChH;AAED,QAAA,MAAM,UAAU,uCAA8C,CAAC;AAE/D,MAAM,WAAW,uBAAuB;IACtC,QAAQ,EAAE,SAAS,CAAC;IACpB,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,KAAK,IAAI,CAAC;IAChD,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,QAAQ,KAAK,IAAI,CAAC;CACrC;AA+BD,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAiWzD,CAAC;AAEF,eAAO,MAAM,kBAAkB,mCAAc,CAAC;AAE9C,eAAO,MAAM,MAAM,QAAO,eAMzB,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -22,16 +22,20 @@ export interface UseAuthOperationsOptions {
22
22
  loginFailure: (message: string) => void;
23
23
  logoutStore: () => void;
24
24
  setAuthState: (state: Partial<AuthState>) => void;
25
+ setIdentitySynced: (synced: boolean) => void;
26
+ setSyncing: (syncing: boolean) => void;
25
27
  logger?: (message: string, error?: unknown) => void;
26
28
  }
27
29
  export interface UseAuthOperationsResult {
28
- /** Create a new identity and register with the server */
29
- createIdentity: (username: string, email?: string) => Promise<{
30
- user: User;
30
+ /** Create a new identity locally (offline-first) and optionally sync with server */
31
+ createIdentity: () => Promise<{
31
32
  recoveryPhrase: string[];
33
+ synced: boolean;
32
34
  }>;
33
35
  /** Import an existing identity from recovery phrase */
34
- importIdentity: (phrase: string, username?: string, email?: string) => Promise<User>;
36
+ importIdentity: (phrase: string) => Promise<{
37
+ synced: boolean;
38
+ }>;
35
39
  /** Sign in with existing identity on device */
36
40
  signIn: (deviceName?: string) => Promise<User>;
37
41
  /** Logout from current session */
@@ -42,10 +46,14 @@ export interface UseAuthOperationsResult {
42
46
  hasIdentity: () => Promise<boolean>;
43
47
  /** Get the public key of the stored identity */
44
48
  getPublicKey: () => Promise<string | null>;
49
+ /** Check if identity is synced with server */
50
+ isIdentitySynced: () => Promise<boolean>;
51
+ /** Sync local identity with server (when online) */
52
+ syncIdentity: () => Promise<User>;
45
53
  }
46
54
  /**
47
55
  * Authentication operations using public key cryptography.
48
56
  * No passwords required - identity is based on ECDSA key pairs.
49
57
  */
50
- export declare const useAuthOperations: ({ oxyServices, storage, sessions, activeSessionId, setActiveSessionId, updateSessions, saveActiveSessionId, clearSessionState, switchSession, applyLanguagePreference, onAuthStateChange, onError, loginSuccess, loginFailure, logoutStore, setAuthState, logger, }: UseAuthOperationsOptions) => UseAuthOperationsResult;
58
+ export declare const useAuthOperations: ({ oxyServices, storage, sessions, activeSessionId, setActiveSessionId, updateSessions, saveActiveSessionId, clearSessionState, switchSession, applyLanguagePreference, onAuthStateChange, onError, loginSuccess, loginFailure, logoutStore, setAuthState, setIdentitySynced, setSyncing, logger, }: UseAuthOperationsOptions) => UseAuthOperationsResult;
51
59
  //# sourceMappingURL=useAuthOperations.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useAuthOperations.d.ts","sourceRoot":"","sources":["../../../../../src/ui/context/hooks/useAuthOper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AGG;AACH,eAAO,MAAM,iBAAiB,GAAI,oSAoB/B,wBAAwB,KAAG,uBA6a7B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"AccountSettingsScreen.d.ts","sourceRoot":"","sources":["../../../../src/ui/screens/AccountSettingsScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4D,MAAM,OAAO,CAAC;AAcjF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;;mBA8Cc,MAAM;qBAAmB,MAAM;;AAgtExG,wBAAiD"}
1
+ {"version":3,"file":"AccountSettingsScreen.d.ts","sourceRoot":"","sources":["../../../../src/ui/screens/AccountSettingsScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4D,MAAM,OAAO,CAAC;AAcjF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;;mBA4Cc,MAAM;qBAAmB,MAAM;;AA0gExG,wBAAiD"}
@@ -6,6 +6,7 @@
6
6
  * 1. Scan QR code with Oxy Accounts app
7
7
  * 2. Open Oxy Accounts app directly (via deep link)
8
8
  *
9
+ * Uses WebSocket for real-time authorization updates (with polling fallback).
9
10
  * The Oxy Accounts app is where users manage their cryptographic identity.
10
11
  * This screen should NOT be used within the Accounts app itself.
11
12
  */
@@ -1 +1 @@
1
- {"version":3,"file":"OxyAuthScreen.d.ts","sourceRoot":"","sources":["../../../../src/ui/screens/OxyAuthScreen.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAW/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAkB3D,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CA6P5C,CAAC;AA2GF,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"OxyAuthScreen.d.ts","sourceRoot":"","sources":["../../../../src/ui/screens/OxyAuthScreen.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAY/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AA6B3D,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CA2W5C,CAAC;AA2GF,eAAe,aAAa,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"PrivacySettingsScreen.d.ts","sourceRoot":"","sources":["../../../../src/ui/screens/PrivacySettingsScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoD,MAAM,OAAO,CAAC;AASzE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;;AA+f3D,wBAAiD"}
1
+ {"version":3,"file":"PrivacySettingsScreen.d.ts","sourceRoot":"","sources":["../../../../src/ui/screens/PrivacySettingsScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoD,MAAM,OAAO,CAAC;AASzE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;;AA6f3D,wBAAiD"}
@@ -1 +1 @@
1
- {"version":3,"file":"SessionManagementScreen.d.ts","sourceRoot":"","sources":["../../../../src/ui/screens/SessionManagementScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAa/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAU3D,QAAA,MAAM,uBAAuB,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAuStD,CAAC;AAuFF,eAAe,uBAAuB,CAAC"}
1
+ {"version":3,"file":"SessionManagementScreen.d.ts","sourceRoot":"","sources":["../../../../src/ui/screens/SessionManagementScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAa/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAqB3D,QAAA,MAAM,uBAAuB,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CA4StD,CAAC;AAwFF,eAAe,uBAAuB,CAAC"}
@@ -5,6 +5,8 @@ export interface AuthState {
5
5
  isLoading: boolean;
6
6
  error: string | null;
7
7
  lastUserFetch: number | null;
8
+ isIdentitySynced: boolean;
9
+ isSyncing: boolean;
8
10
  loginSuccess: (user: User) => void;
9
11
  loginFailure: (error: string) => void;
10
12
  logout: () => void;
@@ -16,6 +18,8 @@ export interface AuthState {
16
18
  getCurrentUser: () => Promise<User>;
17
19
  }) => Promise<void>;
18
20
  setUser: (user: User) => void;
21
+ setIdentitySynced: (synced: boolean) => void;
22
+ setSyncing: (syncing: boolean) => void;
19
23
  }
20
24
  export declare const useAuthStore: import("zustand").UseBoundStore<import("zustand").StoreApi<AuthState>>;
21
25
  //# sourceMappingURL=authStore.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"authStore.d.ts","sourceRoot":"","sources":["../../../../src/ui/stores/authStore.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAEpD,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;IAClB,eAAe,EAAE,OAAO,CAAC;IACzB,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,YAAY,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IACnC,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,SAAS,EAAE,CAAC,WAAW,EAAE;QAAE,cAAc,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;KAAE,EAAE,YAAY,CAAC,EAAE,OAAO,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3G,UAAU,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,IA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AAC;QAAC,cAAc,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;KAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACtK,OAAO,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IAG9B,iBAAiB,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IAC7C,UAAU,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;CACxC;AAED,eAAO,MAAM,YAAY,wEAuEtB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oxyhq/services",
3
- "version": "5.15.8",
3
+ "version": "5.16.0",
4
4
  "description": "Reusable OxyHQ module to handle authentication, user management, karma system, device-based session management and more 🚀",
5
5
  "main": "lib/commonjs/index.js",
6
6
  "module": "lib/module/index.js",
@@ -97,6 +97,7 @@
97
97
  "elliptic": "^6.6.1",
98
98
  "expo-blur": "~15.0.8",
99
99
  "expo-crypto": "~14.0.1",
100
+ "expo-print": "~15.0.8",
100
101
  "expo-secure-store": "~14.0.0",
101
102
  "invariant": "^2.2.4",
102
103
  "jwt-decode": "^4.0.0",
@@ -127,7 +128,7 @@
127
128
  "expo-font": "~14.0.9",
128
129
  "expo-haptics": "~14.0.0",
129
130
  "expo-image": "~3.0.10",
130
- "expo-linear-gradient": "^14.0.0",
131
+ "expo-linear-gradient": "^15.0.0",
131
132
  "husky": "^4.3.8",
132
133
  "jest": "~29.7.0",
133
134
  "lint-staged": "^15.2.4",
@@ -147,11 +148,11 @@
147
148
  "@types/react": "*",
148
149
  "@types/react-native": "*",
149
150
  "axios": "^1.9.0",
150
- "expo": "~54.0.22",
151
+ "expo": "~54.0.23",
151
152
  "expo-file-system": "~19.0.0",
152
153
  "expo-font": "~14.0.9",
153
154
  "expo-image": "~3.0.10",
154
- "expo-linear-gradient": "^14.0.0",
155
+ "expo-linear-gradient": "^15.0.0",
155
156
  "invariant": "^2.2.4",
156
157
  "jwt-decode": "^4.0.0",
157
158
  "react": ">=18.0.0",
@@ -203,4 +204,4 @@
203
204
  "react-native-gesture-handler": "~2.28.0",
204
205
  "react-native-reanimated": "~4.1.1"
205
206
  }
206
- }
207
+ }
@@ -76,7 +76,6 @@ import { composeOxyServices } from './mixins';
76
76
  * - **Base**: Core infrastructure (HTTP client, request management, error handling)
77
77
  * - **Auth**: Authentication and session management
78
78
  * - **User**: User profiles, follow, notifications
79
- * - **TOTP**: Two-factor authentication enrollment
80
79
  * - **Privacy**: Blocked and restricted users
81
80
  * - **Language**: Language detection and metadata
82
81
  * - **Payment**: Payment processing
@@ -43,26 +43,21 @@ export function OxyServicesAuthMixin<T extends typeof OxyServicesBase>(Base: T)
43
43
  }
44
44
 
45
45
  /**
46
- * Register a new user with public key authentication
46
+ * Register a new identity with public key authentication
47
+ * Identity is purely cryptographic - username and profile data are optional
47
48
  *
48
49
  * @param publicKey - The user's ECDSA public key (hex)
49
- * @param username - Desired username
50
- * @param email - Optional email address
51
50
  * @param signature - Signature of the registration request
52
51
  * @param timestamp - Timestamp when the signature was created
53
52
  */
54
53
  async register(
55
54
  publicKey: string,
56
- username: string,
57
55
  signature: string,
58
- timestamp: number,
59
- email?: string
56
+ timestamp: number
60
57
  ): Promise<{ message: string; user: User }> {
61
58
  try {
62
59
  const res = await this.makeRequest<{ message: string; user: User }>('POST', '/api/auth/register', {
63
60
  publicKey,
64
- username,
65
- email,
66
61
  signature,
67
62
  timestamp,
68
63
  }, { cache: false });
@@ -100,13 +100,10 @@ export function OxyServicesDevicesMixin<T extends typeof OxyServicesBase>(Base:
100
100
  }
101
101
 
102
102
  /**
103
- * Get security information (TOTP status, backup codes count)
103
+ * Get security information
104
104
  * @returns Security information object
105
105
  */
106
106
  async getSecurityInfo(): Promise<{
107
- twoFactorEnabled: boolean;
108
- totpCreatedAt: string | null;
109
- backupCodesCount: number;
110
107
  recoveryEmail: string | null;
111
108
  }> {
112
109
  try {
@@ -8,7 +8,6 @@
8
8
  import { OxyServicesBase } from '../OxyServices.base';
9
9
  import { OxyServicesAuthMixin } from './OxyServices.auth';
10
10
  import { OxyServicesUserMixin } from './OxyServices.user';
11
- import { OxyServicesTotpMixin } from './OxyServices.totp';
12
11
  import { OxyServicesPrivacyMixin } from './OxyServices.privacy';
13
12
  import { OxyServicesLanguageMixin } from './OxyServices.language';
14
13
  import { OxyServicesPaymentMixin } from './OxyServices.payment';
@@ -39,10 +38,8 @@ export function composeOxyServices() {
39
38
  OxyServicesPaymentMixin(
40
39
  OxyServicesLanguageMixin(
41
40
  OxyServicesPrivacyMixin(
42
- OxyServicesTotpMixin(
43
- OxyServicesUserMixin(
44
- OxyServicesAuthMixin(OxyServicesBase)
45
- )
41
+ OxyServicesUserMixin(
42
+ OxyServicesAuthMixin(OxyServicesBase)
46
43
  )
47
44
  )
48
45
  )
@@ -22,3 +22,4 @@ export {
22
22
  // Re-export for convenience
23
23
  export { KeyManager as default } from './keyManager';
24
24
 
25
+
@@ -247,3 +247,4 @@ export class KeyManager {
247
247
 
248
248
  export default KeyManager;
249
249
 
250
+
@@ -78,3 +78,4 @@ if (typeof globalObject.crypto === 'undefined') {
78
78
 
79
79
  // Re-export Buffer for convenience
80
80
  export { Buffer };
81
+
@@ -163,3 +163,4 @@ export class RecoveryPhraseService {
163
163
 
164
164
  export default RecoveryPhraseService;
165
165
 
166
+
@@ -237,18 +237,16 @@ export class SignatureService {
237
237
  /**
238
238
  * Create a registration signature
239
239
  * Used when registering a new identity with the server
240
+ * Format matches server expectation: oxy:register:{publicKey}:{timestamp}
240
241
  */
241
- static async createRegistrationSignature(
242
- username: string,
243
- email?: string
244
- ): Promise<{ signature: string; publicKey: string; timestamp: number }> {
242
+ static async createRegistrationSignature(): Promise<{ signature: string; publicKey: string; timestamp: number }> {
245
243
  const publicKey = await KeyManager.getPublicKey();
246
244
  if (!publicKey) {
247
245
  throw new Error('No identity found. Please create or import an identity first.');
248
246
  }
249
247
 
250
248
  const timestamp = Date.now();
251
- const message = `register:${publicKey}:${username}:${email || ''}:${timestamp}`;
249
+ const message = `oxy:register:${publicKey}:${timestamp}`;
252
250
  const signature = await SignatureService.sign(message);
253
251
 
254
252
  return {
@@ -292,3 +290,4 @@ export class SignatureService {
292
290
 
293
291
  export default SignatureService;
294
292
 
293
+
@@ -46,14 +46,6 @@
46
46
  "status": {
47
47
  "accountSwitched": "استخدام {{name}} الآن"
48
48
  },
49
- "totp": {
50
- "title": "رمز المصادقة الثنائية",
51
- "subtitle": "أدخل الرمز المكون من 6 أرقام من تطبيق المصادقة الخاص بك لـ @{{username}}",
52
- "invalidCode": "رمز غير صالح. يرجى المحاولة مرة أخرى.",
53
- "noAccess": "لا يمكن الوصول إلى تطبيق المصادقة؟",
54
- "useBackupCode": "استخدام رمز النسخ الاحتياطي",
55
- "useRecoveryKey": "استخدام مفتاح الاسترداد"
56
- }
57
49
  },
58
50
  "signup": {
59
51
  "welcome": {
@@ -98,7 +90,7 @@
98
90
  "password": "كلمة المرور"
99
91
  },
100
92
  "notSet": "غير محدد",
101
- "securityTip": "لمزيد من الأمان، قم بتمكين المصادقة الثنائية (TOTP) من إعدادات الحساب بعد إنشاء حسابك.",
93
+ "securityTip": "لمزيد من الأمان، قم بتمكين المصادقة الحيوية من إعدادات الحساب بعد إنشاء حسابك.",
102
94
  "legalReminder": "بإنشاء حساب، فإنك توافق على شروط الخدمة وسياسة الخصوصية الخاصة بنا."
103
95
  }
104
96
  },
@@ -46,14 +46,6 @@
46
46
  "status": {
47
47
  "accountSwitched": "Ara utilitzant {{name}}"
48
48
  },
49
- "totp": {
50
- "title": "Codi de dos factors",
51
- "subtitle": "Introdueix el codi de 6 dígits de la teva app autenticadora per @{{username}}",
52
- "invalidCode": "Codi invàlid. Torna-ho a intentar.",
53
- "noAccess": "Sense accés al teu autenticador?",
54
- "useBackupCode": "Utilitzar codi de còpia de seguretat",
55
- "useRecoveryKey": "Utilitzar clau de recuperació"
56
- }
57
49
  },
58
50
  "signup": {
59
51
  "welcome": {
@@ -98,7 +90,7 @@
98
90
  "password": "Contrasenya"
99
91
  },
100
92
  "notSet": "No definit",
101
- "securityTip": "Per a una major seguretat, habilita l'Autenticació de Dos Factors (TOTP) des de Configuració del compte després de crear el teu compte.",
93
+ "securityTip": "Per a una major seguretat, habilita l'autenticació biomètrica des de Configuració del compte després de crear el teu compte.",
102
94
  "legalReminder": "En crear un compte, acceptes els nostres Termes de servei i Política de privacitat."
103
95
  }
104
96
  },
@@ -46,14 +46,6 @@
46
46
  "status": {
47
47
  "accountSwitched": "Verwende jetzt {{name}}"
48
48
  },
49
- "totp": {
50
- "title": "Zwei-Faktor-Code",
51
- "subtitle": "Geben Sie den 6-stelligen Code von Ihrer Authenticator-App für @{{username}} ein",
52
- "invalidCode": "Ungültiger Code. Bitte versuchen Sie es erneut.",
53
- "noAccess": "Kein Zugriff auf Ihren Authenticator?",
54
- "useBackupCode": "Backup-Code verwenden",
55
- "useRecoveryKey": "Wiederherstellungsschlüssel verwenden"
56
- }
57
49
  },
58
50
  "signup": {
59
51
  "welcome": {
@@ -98,7 +90,7 @@
98
90
  "password": "Passwort"
99
91
  },
100
92
  "notSet": "Nicht festgelegt",
101
- "securityTip": "Für mehr Sicherheit aktivieren Sie die Zwei-Faktor-Authentifizierung (TOTP) in den Kontoeinstellungen, nachdem Sie Ihr Konto erstellt haben.",
93
+ "securityTip": "Für mehr Sicherheit aktivieren Sie die biometrische Authentifizierung in den Kontoeinstellungen, nachdem Sie Ihr Konto erstellt haben.",
102
94
  "legalReminder": "Durch die Erstellung eines Kontos stimmen Sie unseren Nutzungsbedingungen und der Datenschutzrichtlinie zu."
103
95
  }
104
96
  },
@@ -46,14 +46,6 @@
46
46
  "status": {
47
47
  "accountSwitched": "Now using {{name}}"
48
48
  },
49
- "totp": {
50
- "title": "Two‑Factor Code",
51
- "subtitle": "Enter the 6‑digit code from your authenticator app for @{{username}}",
52
- "invalidCode": "Invalid code. Please try again.",
53
- "noAccess": "No access to your authenticator?",
54
- "useBackupCode": "Use backup code",
55
- "useRecoveryKey": "Use recovery key"
56
- }
57
49
  },
58
50
  "signup": {
59
51
  "welcome": {
@@ -98,7 +90,7 @@
98
90
  "password": "Password"
99
91
  },
100
92
  "notSet": "Not set",
101
- "securityTip": "For stronger security, enable Two‑Factor Authentication (TOTP) from Account Settings after you create your account.",
93
+ "securityTip": "For stronger security, enable biometric authentication from Account Settings after you create your account.",
102
94
  "legalReminder": "By creating an account, you agree to our Terms of Service and Privacy Policy.",
103
95
  "sections": {
104
96
  "account": "Account Information",
@@ -245,7 +237,7 @@
245
237
  "enterCode": "Enter the 6‑digit code from your authenticator app.",
246
238
  "newPassword": "Set New Password",
247
239
  "resetSuccess": "Your password has been reset! You can now sign in.",
248
- "noEmail": "We no longer send recovery emails. If you enabled Two‑Factor Authentication (TOTP), sign in with your username and password, then enter your authenticator code. Otherwise, contact support to regain access.",
240
+ "noEmail": "We no longer send recovery emails. Please use your recovery phrase to restore your identity. Contact support if you need assistance.",
249
241
  "password": {
250
242
  "minLength": "Password must be at least 8 characters long",
251
243
  "mismatch": "Passwords do not match",
@@ -589,11 +581,6 @@
589
581
  "title": "Verify Account",
590
582
  "subtitle": "Get a verified badge"
591
583
  },
592
- "twoFactor": {
593
- "title": "Two‑Factor Authentication",
594
- "enabled": "Enabled",
595
- "disabled": "Disabled (recommended)"
596
- }
597
584
  },
598
585
  "confirms": {
599
586
  "removeAvatar": "Remove your profile picture?"
@@ -608,11 +595,6 @@
608
595
  "avatarUpdated": "Avatar updated",
609
596
  "updateAvatarFailed": "Failed to update avatar",
610
597
  "noActiveSession": "No active session",
611
- "totpStartFailed": "Failed to start TOTP enrollment",
612
- "twoFactorEnabled": "Two‑Factor Authentication enabled",
613
- "invalidCode": "Invalid code",
614
- "twoFactorDisabled": "Two‑Factor Authentication disabled",
615
- "disableFailed": "Failed to disable"
616
598
  }
617
599
  },
618
600
  "accountOverview": {
@@ -663,7 +645,7 @@
663
645
  },
664
646
  "security": {
665
647
  "title": "Security & Privacy",
666
- "subtitle": "Password, 2FA, and privacy settings"
648
+ "subtitle": "Security and privacy settings"
667
649
  },
668
650
  "notifications": {
669
651
  "title": "Notifications",
@@ -46,14 +46,6 @@
46
46
  "status": {
47
47
  "accountSwitched": "Ahora usando {{name}}"
48
48
  },
49
- "totp": {
50
- "title": "Código de dos factores",
51
- "subtitle": "Introduce el código de 6 dígitos de tu app autenticadora para @{{username}}",
52
- "invalidCode": "Código inválido. Inténtalo de nuevo.",
53
- "noAccess": "¿Sin acceso a tu autenticador?",
54
- "useBackupCode": "Usar código de respaldo",
55
- "useRecoveryKey": "Usar clave de recuperación"
56
- }
57
49
  },
58
50
  "signup": {
59
51
  "welcome": {
@@ -98,7 +90,7 @@
98
90
  "password": "Contraseña"
99
91
  },
100
92
  "notSet": "Sin definir",
101
- "securityTip": "Para mayor seguridad, habilita la Autenticación de Dos Factores (TOTP) en Configuración de la cuenta después de crear tu cuenta.",
93
+ "securityTip": "Para mayor seguridad, habilita la autenticación biométrica en Configuración de la cuenta después de crear tu cuenta.",
102
94
  "legalReminder": "Al crear una cuenta, aceptas nuestros Términos de servicio y Política de privacidad."
103
95
  }
104
96
  },
@@ -133,7 +125,7 @@
133
125
  "enterCode": "Introduce el código de 6 dígitos de tu app de autenticación.",
134
126
  "newPassword": "Establecer nueva contraseña",
135
127
  "resetSuccess": "¡Tu contraseña ha sido restablecida! Ahora puedes iniciar sesión.",
136
- "noEmail": "Ya no enviamos correos de recuperación. Si activaste la autenticación de dos factores (TOTP), inicia sesión con tu usuario y contraseña y luego introduce el código del autenticador. De lo contrario, contacta con soporte.",
128
+ "noEmail": "Ya no enviamos correos de recuperación. Por favor, usa tu frase de recuperación para restaurar tu identidad. Contacta con soporte si necesitas ayuda.",
137
129
  "password": {
138
130
  "minLength": "La contraseña debe tener al menos 8 caracteres",
139
131
  "mismatch": "Las contraseñas no coinciden",
@@ -196,11 +188,6 @@
196
188
  "subtitle": "Obtén una insignia verificada",
197
189
  "coming": "¡La verificación de cuenta estará disponible pronto!"
198
190
  },
199
- "twoFactor": {
200
- "title": "Autenticación de dos factores",
201
- "enabled": "Activada",
202
- "disabled": "Desactivada (recomendado)"
203
- }
204
191
  },
205
192
  "confirms": {
206
193
  "removeAvatar": "¿Eliminar tu foto de perfil?"
@@ -215,11 +202,6 @@
215
202
  "avatarUpdated": "Avatar actualizado",
216
203
  "updateAvatarFailed": "Error al actualizar el avatar",
217
204
  "noActiveSession": "No hay sesión activa",
218
- "totpStartFailed": "Error al iniciar el registro TOTP",
219
- "twoFactorEnabled": "Autenticación de dos factores activada",
220
- "invalidCode": "Código inválido",
221
- "twoFactorDisabled": "Autenticación de dos factores desactivada",
222
- "disableFailed": "Error al desactivar"
223
205
  }
224
206
  },
225
207
  "common": {
@@ -291,7 +273,7 @@
291
273
  },
292
274
  "security": {
293
275
  "title": "Seguridad y privacidad",
294
- "subtitle": "Contraseña, 2FA y ajustes de privacidad"
276
+ "subtitle": "Seguridad y ajustes de privacidad"
295
277
  },
296
278
  "notifications": {
297
279
  "title": "Notificaciones",
@@ -46,14 +46,6 @@
46
46
  "status": {
47
47
  "accountSwitched": "Utilisation de {{name}}"
48
48
  },
49
- "totp": {
50
- "title": "Code à deux facteurs",
51
- "subtitle": "Entrez le code à 6 chiffres de votre application d'authentification pour @{{username}}",
52
- "invalidCode": "Code invalide. Veuillez réessayer.",
53
- "noAccess": "Pas d'accès à votre authentificateur ?",
54
- "useBackupCode": "Utiliser le code de sauvegarde",
55
- "useRecoveryKey": "Utiliser la clé de récupération"
56
- }
57
49
  },
58
50
  "signup": {
59
51
  "welcome": {
@@ -98,7 +90,7 @@
98
90
  "password": "Mot de passe"
99
91
  },
100
92
  "notSet": "Non défini",
101
- "securityTip": "Pour une sécurité renforcée, activez l'authentification à deux facteurs (TOTP) dans les paramètres du compte après avoir créé votre compte.",
93
+ "securityTip": "Pour une sécurité renforcée, activez l'authentification biométrique dans les paramètres du compte après avoir créé votre compte.",
102
94
  "legalReminder": "En créant un compte, vous acceptez nos Conditions d'utilisation et notre Politique de confidentialité."
103
95
  }
104
96
  },
@@ -46,14 +46,6 @@
46
46
  "status": {
47
47
  "accountSwitched": "Ora usando {{name}}"
48
48
  },
49
- "totp": {
50
- "title": "Codice a due fattori",
51
- "subtitle": "Inserisci il codice a 6 cifre dalla tua app autenticatore per @{{username}}",
52
- "invalidCode": "Codice non valido. Riprova.",
53
- "noAccess": "Nessun accesso al tuo autenticatore?",
54
- "useBackupCode": "Usa codice di backup",
55
- "useRecoveryKey": "Usa chiave di recupero"
56
- }
57
49
  },
58
50
  "signup": {
59
51
  "welcome": {
@@ -98,7 +90,7 @@
98
90
  "password": "Password"
99
91
  },
100
92
  "notSet": "Non impostato",
101
- "securityTip": "Per una maggiore sicurezza, abilita l'autenticazione a due fattori (TOTP) dalle Impostazioni account dopo aver creato il tuo account.",
93
+ "securityTip": "Per una maggiore sicurezza, abilita l'autenticazione biometrica dalle Impostazioni account dopo aver creato il tuo account.",
102
94
  "legalReminder": "Creando un account, accetti i nostri Termini di servizio e l'Informativa sulla privacy."
103
95
  }
104
96
  },
@@ -46,14 +46,6 @@
46
46
  "status": {
47
47
  "accountSwitched": "{{name}}を使用中"
48
48
  },
49
- "totp": {
50
- "title": "二要素認証コード",
51
- "subtitle": "@{{username}}の認証アプリから6桁のコードを入力してください",
52
- "invalidCode": "無効なコードです。もう一度お試しください。",
53
- "noAccess": "認証アプリにアクセスできませんか?",
54
- "useBackupCode": "バックアップコードを使用",
55
- "useRecoveryKey": "回復キーを使用"
56
- }
57
49
  },
58
50
  "signup": {
59
51
  "welcome": {
@@ -98,7 +90,7 @@
98
90
  "password": "パスワード"
99
91
  },
100
92
  "notSet": "未設定",
101
- "securityTip": "より強力なセキュリティのため、アカウント作成後、アカウント設定から二要素認証(TOTP)を有効にしてください。",
93
+ "securityTip": "より強力なセキュリティのため、アカウント作成後、アカウント設定から生体認証を有効にしてください。",
102
94
  "legalReminder": "アカウントを作成することで、利用規約とプライバシーポリシーに同意したことになります。"
103
95
  }
104
96
  },
@@ -46,14 +46,6 @@
46
46
  "status": {
47
47
  "accountSwitched": "{{name}} 사용 중"
48
48
  },
49
- "totp": {
50
- "title": "2단계 인증 코드",
51
- "subtitle": "@{{username}}의 인증 앱에서 6자리 코드를 입력하세요",
52
- "invalidCode": "잘못된 코드입니다. 다시 시도해주세요.",
53
- "noAccess": "인증 앱에 액세스할 수 없나요?",
54
- "useBackupCode": "백업 코드 사용",
55
- "useRecoveryKey": "복구 키 사용"
56
- }
57
49
  },
58
50
  "signup": {
59
51
  "welcome": {
@@ -98,7 +90,7 @@
98
90
  "password": "비밀번호"
99
91
  },
100
92
  "notSet": "설정되지 않음",
101
- "securityTip": "더 강력한 보안을 위해 계정을 만든 후 계정 설정에서 2단계 인증(TOTP)을 활성화하세요.",
93
+ "securityTip": "더 강력한 보안을 위해 계정을 만든 후 계정 설정에서 생체 인증을 활성화하세요.",
102
94
  "legalReminder": "계정을 만들면 서비스 약관 및 개인정보 보호정책에 동의하는 것입니다."
103
95
  }
104
96
  },
@@ -46,14 +46,6 @@
46
46
  "status": {
47
47
  "accountSwitched": "Agora a usar {{name}}"
48
48
  },
49
- "totp": {
50
- "title": "Código de dois fatores",
51
- "subtitle": "Introduza o código de 6 dígitos da sua app autenticadora para @{{username}}",
52
- "invalidCode": "Código inválido. Por favor, tente novamente.",
53
- "noAccess": "Sem acesso ao seu autenticador?",
54
- "useBackupCode": "Usar código de backup",
55
- "useRecoveryKey": "Usar chave de recuperação"
56
- }
57
49
  },
58
50
  "signup": {
59
51
  "welcome": {
@@ -98,7 +90,7 @@
98
90
  "password": "Palavra-passe"
99
91
  },
100
92
  "notSet": "Não definido",
101
- "securityTip": "Para maior segurança, ative a Autenticação de Dois Fatores (TOTP) nas Definições da conta após criar a sua conta.",
93
+ "securityTip": "Para maior segurança, ative a autenticação biométrica nas Definições da conta após criar a sua conta.",
102
94
  "legalReminder": "Ao criar uma conta, concorda com os nossos Termos de Serviço e Política de Privacidade."
103
95
  }
104
96
  },