@oxyhq/services 5.17.7 → 5.17.9

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 (119) hide show
  1. package/lib/commonjs/crypto/index.js +0 -23
  2. package/lib/commonjs/crypto/index.js.map +1 -1
  3. package/lib/commonjs/index.js +0 -15
  4. package/lib/commonjs/index.js.map +1 -1
  5. package/lib/commonjs/ui/components/Icon.js.map +1 -1
  6. package/lib/commonjs/ui/components/IconButton/utils.js.map +1 -1
  7. package/lib/commonjs/ui/components/TextField/Adornment/utils.js.map +1 -1
  8. package/lib/commonjs/ui/components/TextField/helpers.js.map +1 -1
  9. package/lib/commonjs/ui/components/TouchableRipple/utils.js.map +1 -1
  10. package/lib/commonjs/ui/components/Typography/AnimatedText.js.map +1 -1
  11. package/lib/commonjs/ui/context/OxyContext.js +37 -589
  12. package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
  13. package/lib/commonjs/ui/context/OxyContextBase.js.map +1 -1
  14. package/lib/commonjs/ui/context/hooks/useAuthOperations.js +60 -425
  15. package/lib/commonjs/ui/context/hooks/useAuthOperations.js.map +1 -1
  16. package/lib/commonjs/ui/hooks/mutations/useAccountMutations.js +8 -112
  17. package/lib/commonjs/ui/hooks/mutations/useAccountMutations.js.map +1 -1
  18. package/lib/commonjs/ui/hooks/queries/useAccountQueries.js +2 -27
  19. package/lib/commonjs/ui/hooks/queries/useAccountQueries.js.map +1 -1
  20. package/lib/commonjs/ui/hooks/queries/useServicesQueries.js +2 -27
  21. package/lib/commonjs/ui/hooks/queries/useServicesQueries.js.map +1 -1
  22. package/lib/commonjs/ui/hooks/useSessionSocket.js +2 -88
  23. package/lib/commonjs/ui/hooks/useSessionSocket.js.map +1 -1
  24. package/lib/commonjs/ui/screens/OxyAuthScreen.js +0 -1
  25. package/lib/commonjs/ui/screens/OxyAuthScreen.js.map +1 -1
  26. package/lib/commonjs/ui/stores/authStore.js +52 -15
  27. package/lib/commonjs/ui/stores/authStore.js.map +1 -1
  28. package/lib/commonjs/ui/utils/avatarUtils.js +2 -32
  29. package/lib/commonjs/ui/utils/avatarUtils.js.map +1 -1
  30. package/lib/module/crypto/index.js +4 -6
  31. package/lib/module/crypto/index.js.map +1 -1
  32. package/lib/module/index.js +6 -3
  33. package/lib/module/index.js.map +1 -1
  34. package/lib/module/ui/components/Icon.js.map +1 -1
  35. package/lib/module/ui/components/IconButton/utils.js.map +1 -1
  36. package/lib/module/ui/components/TextField/Adornment/utils.js.map +1 -1
  37. package/lib/module/ui/components/TextField/helpers.js.map +1 -1
  38. package/lib/module/ui/components/TouchableRipple/utils.js.map +1 -1
  39. package/lib/module/ui/components/Typography/AnimatedText.js.map +1 -1
  40. package/lib/module/ui/context/OxyContext.js +35 -588
  41. package/lib/module/ui/context/OxyContext.js.map +1 -1
  42. package/lib/module/ui/context/OxyContextBase.js.map +1 -1
  43. package/lib/module/ui/context/hooks/useAuthOperations.js +60 -424
  44. package/lib/module/ui/context/hooks/useAuthOperations.js.map +1 -1
  45. package/lib/module/ui/hooks/mutations/useAccountMutations.js +8 -112
  46. package/lib/module/ui/hooks/mutations/useAccountMutations.js.map +1 -1
  47. package/lib/module/ui/hooks/queries/useAccountQueries.js +2 -27
  48. package/lib/module/ui/hooks/queries/useAccountQueries.js.map +1 -1
  49. package/lib/module/ui/hooks/queries/useServicesQueries.js +2 -27
  50. package/lib/module/ui/hooks/queries/useServicesQueries.js.map +1 -1
  51. package/lib/module/ui/hooks/useSessionSocket.js +2 -88
  52. package/lib/module/ui/hooks/useSessionSocket.js.map +1 -1
  53. package/lib/module/ui/screens/OxyAuthScreen.js +0 -1
  54. package/lib/module/ui/screens/OxyAuthScreen.js.map +1 -1
  55. package/lib/module/ui/stores/authStore.js +52 -15
  56. package/lib/module/ui/stores/authStore.js.map +1 -1
  57. package/lib/module/ui/utils/avatarUtils.js +2 -32
  58. package/lib/module/ui/utils/avatarUtils.js.map +1 -1
  59. package/lib/typescript/crypto/index.d.ts +2 -5
  60. package/lib/typescript/crypto/index.d.ts.map +1 -1
  61. package/lib/typescript/crypto/types.d.ts +6 -2
  62. package/lib/typescript/crypto/types.d.ts.map +1 -1
  63. package/lib/typescript/index.d.ts +4 -2
  64. package/lib/typescript/index.d.ts.map +1 -1
  65. package/lib/typescript/ui/components/IconButton/utils.d.ts +1 -1
  66. package/lib/typescript/ui/components/TextField/Adornment/utils.d.ts +1 -1
  67. package/lib/typescript/ui/components/TextField/Adornment/utils.d.ts.map +1 -1
  68. package/lib/typescript/ui/components/TextField/helpers.d.ts +6 -6
  69. package/lib/typescript/ui/components/types.d.ts +0 -4
  70. package/lib/typescript/ui/components/types.d.ts.map +1 -1
  71. package/lib/typescript/ui/context/OxyContext.d.ts.map +1 -1
  72. package/lib/typescript/ui/context/OxyContextBase.d.ts +2 -39
  73. package/lib/typescript/ui/context/OxyContextBase.d.ts.map +1 -1
  74. package/lib/typescript/ui/context/hooks/useAuthOperations.d.ts +10 -25
  75. package/lib/typescript/ui/context/hooks/useAuthOperations.d.ts.map +1 -1
  76. package/lib/typescript/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
  77. package/lib/typescript/ui/hooks/queries/useAccountQueries.d.ts.map +1 -1
  78. package/lib/typescript/ui/hooks/queries/useServicesQueries.d.ts.map +1 -1
  79. package/lib/typescript/ui/hooks/useSessionSocket.d.ts +1 -14
  80. package/lib/typescript/ui/hooks/useSessionSocket.d.ts.map +1 -1
  81. package/lib/typescript/ui/stores/authStore.d.ts +27 -4
  82. package/lib/typescript/ui/stores/authStore.d.ts.map +1 -1
  83. package/lib/typescript/ui/utils/avatarUtils.d.ts +0 -2
  84. package/lib/typescript/ui/utils/avatarUtils.d.ts.map +1 -1
  85. package/package.json +2 -2
  86. package/src/crypto/index.ts +3 -11
  87. package/src/crypto/types.ts +6 -2
  88. package/src/index.ts +6 -11
  89. package/src/ui/components/Icon.tsx +1 -1
  90. package/src/ui/components/IconButton/utils.ts +1 -1
  91. package/src/ui/components/TextField/Adornment/utils.ts +2 -2
  92. package/src/ui/components/TextField/helpers.tsx +8 -8
  93. package/src/ui/components/TouchableRipple/utils.ts +2 -2
  94. package/src/ui/components/Typography/AnimatedText.tsx +2 -2
  95. package/src/ui/components/types.tsx +0 -6
  96. package/src/ui/context/OxyContext.tsx +33 -637
  97. package/src/ui/context/OxyContextBase.tsx +5 -23
  98. package/src/ui/context/hooks/useAuthOperations.ts +84 -460
  99. package/src/ui/hooks/mutations/useAccountMutations.ts +12 -110
  100. package/src/ui/hooks/queries/useAccountQueries.ts +3 -27
  101. package/src/ui/hooks/queries/useServicesQueries.ts +3 -27
  102. package/src/ui/hooks/useSessionSocket.ts +2 -106
  103. package/src/ui/screens/OxyAuthScreen.tsx +1 -1
  104. package/src/ui/stores/authStore.ts +57 -18
  105. package/src/ui/utils/avatarUtils.ts +4 -36
  106. package/lib/commonjs/crypto/keyManager.js +0 -511
  107. package/lib/commonjs/crypto/keyManager.js.map +0 -1
  108. package/lib/commonjs/crypto/signatureService.js +0 -269
  109. package/lib/commonjs/crypto/signatureService.js.map +0 -1
  110. package/lib/module/crypto/keyManager.js +0 -508
  111. package/lib/module/crypto/keyManager.js.map +0 -1
  112. package/lib/module/crypto/signatureService.js +0 -266
  113. package/lib/module/crypto/signatureService.js.map +0 -1
  114. package/lib/typescript/crypto/keyManager.d.ts +0 -97
  115. package/lib/typescript/crypto/keyManager.d.ts.map +0 -1
  116. package/lib/typescript/crypto/signatureService.d.ts +0 -77
  117. package/lib/typescript/crypto/signatureService.d.ts.map +0 -1
  118. package/src/crypto/keyManager.ts +0 -545
  119. package/src/crypto/signatureService.ts +0 -301
@@ -1,9 +1,8 @@
1
1
  import type { ApiError, User } from '../../../models/interfaces';
2
2
  import type { AuthState } from '../../stores/authStore';
3
- import type { ClientSession } from '../../../models/session';
3
+ import type { ClientSession, SessionLoginResponse } from '../../../models/session';
4
4
  import type { StorageInterface } from '../../utils/storageHelpers';
5
5
  import type { OxyServices } from '../../../core';
6
- import { type BackupData } from '../../../crypto';
7
6
  export interface UseAuthOperationsOptions {
8
7
  oxyServices: OxyServices;
9
8
  storage: StorageInterface | null;
@@ -23,37 +22,23 @@ export interface UseAuthOperationsOptions {
23
22
  loginFailure: (message: string) => void;
24
23
  logoutStore: () => void;
25
24
  setAuthState: (state: Partial<AuthState>) => void;
26
- setIdentitySynced: (synced: boolean) => void;
27
- setSyncing: (syncing: boolean) => void;
28
25
  logger?: (message: string, error?: unknown) => void;
29
26
  }
30
27
  export interface UseAuthOperationsResult {
31
- /** Create a new identity locally (offline-first) and optionally sync with server */
32
- createIdentity: () => Promise<{
33
- synced: boolean;
34
- }>;
35
- /** Import an existing identity from backup file data */
36
- importIdentity: (backupData: BackupData, password: string) => Promise<{
37
- synced: boolean;
38
- }>;
39
- /** Sign in with existing identity on device */
40
- signIn: (deviceName?: string) => Promise<User>;
28
+ /** Complete sign-in after external challenge-response (Accounts app signs, Services completes session) */
29
+ completeSignIn: (sessionResponse: SessionLoginResponse) => Promise<User>;
41
30
  /** Logout from current session */
42
31
  logout: (targetSessionId?: string) => Promise<void>;
43
32
  /** Logout from all sessions */
44
33
  logoutAll: () => Promise<void>;
45
- /** Check if device has an identity stored */
46
- hasIdentity: () => Promise<boolean>;
47
- /** Get the public key of the stored identity */
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>;
53
34
  }
54
35
  /**
55
- * Authentication operations using public key cryptography.
56
- * No passwords required - identity is based on ECDSA key pairs.
36
+ * Authentication operations for Services SDK.
37
+ *
38
+ * ARCHITECTURE:
39
+ * - Services SDK only handles tokens/sessions (NOT identity)
40
+ * - Accounts app handles identity (KeyManager, SignatureService, challenge signing)
41
+ * - completeSignIn() accepts already-verified session from Accounts app
57
42
  */
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;
43
+ export declare const useAuthOperations: ({ oxyServices, storage, sessions, activeSessionId, setActiveSessionId, updateSessions, saveActiveSessionId, clearSessionState, switchSession, applyLanguagePreference, onAuthStateChange, onError, loginSuccess, loginFailure, logoutStore, setAuthState, logger, }: UseAuthOperationsOptions) => UseAuthOperationsResult;
59
44
  //# sourceMappingURL=useAuthOperations.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useAuthOperations.d.ts","sourceRoot":"","sources":["../../../../../src/ui/context/hooks/useAuthOperations.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EAAE,aAAa,EAAwB,MAAM,yBAAyB,CAAC;AAInF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAgC,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAEhF,MAAM,WAAW,wBAAwB;IACvC,WAAW,EAAE,WAAW,CAAC;IACzB,OAAO,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACjC,QAAQ,EAAE,aAAa,EAAE,CAAC;IAC1B,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,kBAAkB,EAAE,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACvD,cAAc,EAAE,CAAC,QAAQ,EAAE,aAAa,EAAE,EAAE,OAAO,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE,KAAK,IAAI,CAAC;IACnF,mBAAmB,EAAE,CAAC,SAAS,EAAE,M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AG,uBA+L7B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"useAccountMutations.d.ts","sourceRoot":"","sources":["../../../../../src/ui/hooks/mutations/useAccountMutations.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAUvD;;GAEG;AACH,eAAO,MAAM,gBAAgB;;EA6G5B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe;SAKQ,MAAM;WAAS,MAAM;WAAS,MAAM;WAAS,MAAM;;;EAwGtF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,wBAAwB;;EAwCpC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,wBAAwB;cAKoB,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;aAAW,MAAM;;;;cAgI5F,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,aAAa;UAUd,IAAI;iBACG,SAAS,GAAG,QAAQ,GAAG,UAAU;eACnC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;iBACjB,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI;WAoD5C,CAAC"}
1
+ {"version":3,"file":"useAccountMutations.d.ts","sourceRoot":"","sources":["../../../../../src/ui/hooks/mutations/useAccountMutations.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAUvD;;GAEG;AACH,eAAO,MAAM,gBAAgB;;EAqF5B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe;SAKQ,MAAM;WAAS,MAAM;WAAS,MAAM;WAAS,MAAM;;;EA8EtF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,wBAAwB;;EAwCpC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,wBAAwB;cAKoB,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;aAAW,MAAM;;;;cAwG5F,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,aAAa;UAUd,IAAI;iBACG,SAAS,GAAG,QAAQ,GAAG,UAAU;eACnC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;iBACjB,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI;WA4B5C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"useAccountQueries.d.ts","sourceRoot":"","sources":["../../../../../src/ui/hooks/queries/useAccountQueries.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAKvD;;GAEG;AACH,eAAO,MAAM,cAAc,GAAI,WAAW,MAAM,GAAG,IAAI,EAAE,UAAU;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,gEAevF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,GAAI,YAAY,MAAM,EAAE,EAAE,UAAU;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,yEAepF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,cAAc,GAAI,UAAU;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,gEAe7D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,WAAW,GAAI,QAAQ,MAAM,GAAG,IAAI,EAAE,UAAU;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,gEAejF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iBAAiB,GAAI,UAAU,MAAM,GAAG,IAAI,EAAE,UAAU;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,gEAezF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kBAAkB,GAAI,YAAY,MAAM,EAAE,EAAE,UAAU;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE;;;WAevF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kBAAkB,GAAI,SAAS,MAAM,EAAE,UAAU;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,+DAmElF,CAAC"}
1
+ {"version":3,"file":"useAccountQueries.d.ts","sourceRoot":"","sources":["../../../../../src/ui/hooks/queries/useAccountQueries.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAKvD;;GAEG;AACH,eAAO,MAAM,cAAc,GAAI,WAAW,MAAM,GAAG,IAAI,EAAE,UAAU;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,gEAevF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,GAAI,YAAY,MAAM,EAAE,EAAE,UAAU;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,yEAepF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,cAAc,GAAI,UAAU;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,gEAe7D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,WAAW,GAAI,QAAQ,MAAM,GAAG,IAAI,EAAE,UAAU;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,gEAejF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iBAAiB,GAAI,UAAU,MAAM,GAAG,IAAI,EAAE,UAAU;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,gEAezF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kBAAkB,GAAI,YAAY,MAAM,EAAE,EAAE,UAAU;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE;;;WAevF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kBAAkB,GAAI,SAAS,MAAM,EAAE,UAAU;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,+DA2ClF,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"useServicesQueries.d.ts","sourceRoot":"","sources":["../../../../../src/ui/hooks/queries/useServicesQueries.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAK7D;;GAEG;AACH,eAAO,MAAM,WAAW,GAAI,SAAS,MAAM,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CAAA;CAAE;;SAY9D,CAAC"}
@@ -7,22 +7,9 @@ interface UseSessionSocketProps {
7
7
  clearSessionState: () => Promise<void>;
8
8
  baseURL: string;
9
9
  getAccessToken: () => string | null;
10
- getTransferCode?: (transferId: string) => {
11
- code: string;
12
- sourceDeviceId: string | null;
13
- publicKey: string;
14
- timestamp: number;
15
- } | null;
16
10
  onRemoteSignOut?: () => void;
17
11
  onSessionRemoved?: (sessionId: string) => void;
18
- onIdentityTransferComplete?: (data: {
19
- transferId: string;
20
- sourceDeviceId: string;
21
- publicKey: string;
22
- transferCode?: string;
23
- completedAt: string;
24
- }) => void;
25
12
  }
26
- export declare function useSessionSocket({ userId, activeSessionId, currentDeviceId, refreshSessions, logout, clearSessionState, baseURL, getAccessToken, getTransferCode, onRemoteSignOut, onSessionRemoved, onIdentityTransferComplete }: UseSessionSocketProps): void;
13
+ export declare function useSessionSocket({ userId, activeSessionId, currentDeviceId, refreshSessions, logout, clearSessionState, baseURL, getAccessToken, onRemoteSignOut, onSessionRemoved }: UseSessionSocketProps): void;
27
14
  export {};
28
15
  //# sourceMappingURL=useSessionSocket.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useSessionSocket.d.ts","sourceRoot":"","sources":["../../../../src/ui/hooks/useSessionSocket.ts"],"names":[],"mappings":"AAMA,UAAU,qBAAqB;IAC7B,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAClC,eAAe,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC3C,eAAe,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC3C,eAAe,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACrC,MAAM,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5B,iBAAiB,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACvC,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,EAAE,MAAM,MAAM,GAAG,IAAI,CA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MAAM,CAAC;IAChB,cAAc,EAAE,MAAM,MAAM,GAAG,IAAI,CAAC;IACpC,eAAe,CAAC,EAAE,MAAM,IAAI,CAAC;IAC7B,gBAAgB,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;CAChD;AAED,wBAAgB,gBAAgB,CAAC,EAAE,MAAM,EAAE,eAAe,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,EAAE,iBAAiB,EAAE,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,gBAAgB,EAAE,EAAE,qBAAqB,QA6W3M"}
@@ -1,14 +1,37 @@
1
+ /**
2
+ * Auth Store (Services SDK)
3
+ *
4
+ * === ARCHITECTURE: Services owns sessions/tokens, NOT identity ===
5
+ *
6
+ * This store manages authentication state:
7
+ * - isAuthenticated: Valid tokens AND online (REQUIRES NETWORK)
8
+ * - isOnline: Network connectivity state
9
+ * - isLoading: Auth operation in progress
10
+ * - error: Last auth error
11
+ *
12
+ * CRITICAL RULES:
13
+ * ✓ isAuthenticated = true ONLY when:
14
+ * 1. Valid access/refresh tokens exist
15
+ * 2. Network is available (isOnline = true)
16
+ *
17
+ * ✗ isAuthenticated must be false when:
18
+ * - Offline (even if tokens exist)
19
+ * - No valid tokens
20
+ * - Tokens expired
21
+ *
22
+ * WHY: Authentication requires server validation. Without network,
23
+ * we cannot verify tokens are still valid or refresh them.
24
+ */
1
25
  export interface AuthState {
2
26
  isAuthenticated: boolean;
27
+ isOnline: boolean;
3
28
  isLoading: boolean;
4
29
  error: string | null;
5
- isIdentitySynced: boolean;
6
- isSyncing: boolean;
30
+ setOnline: (online: boolean) => void;
7
31
  loginSuccess: () => void;
8
32
  loginFailure: (error: string) => void;
9
33
  logout: () => void;
10
- setIdentitySynced: (synced: boolean) => void;
11
- setSyncing: (syncing: boolean) => void;
34
+ canAuthenticate: () => boolean;
12
35
  }
13
36
  export declare const useAuthStore: import("zustand").UseBoundStore<import("zustand").StoreApi<AuthState>>;
14
37
  //# sourceMappingURL=authStore.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"authStore.d.ts","sourceRoot":"","sources":["../../../../src/ui/stores/authStore.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,SAAS;IACxB,eAAe,EAAE,OAAO,CAAC;IACzB,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAGrB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,SAAS,EAAE,OAAO,CAAC;IAEnB,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,MAAM,EAAE,MAAM,IAAI,CAAC;IAGnB,iBAAiB,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IAC7C,UAAU,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;CACxC;AAED,eAAO,MAAM,YAAY,wEAuBtB,CAAC"}
1
+ {"version":3,"file":"authStore.d.ts","sourceRoot":"","sources":["../../../../src/ui/stores/authStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAIH,MAAM,WAAW,SAAS;IACxB,eAAe,EAAE,OAAO,CAAC;IACzB,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAGrB,SAAS,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IACrC,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,MAAM,EAAE,MAAM,IAAI,CAAC;IAGnB,eAAe,EAAE,MAAM,OAAO,CAAC;CAChC;AAED,eAAO,MAAM,YAAY,wEAuCtB,CAAC"}
@@ -27,11 +27,9 @@ export declare function refreshAvatarInStore(sessionId: string, avatarFileId: st
27
27
  * @param oxyServices - OxyServices instance
28
28
  * @param activeSessionId - Active session ID
29
29
  * @param queryClient - TanStack Query client
30
- * @param syncIdentity - Optional sync identity function for handling auth errors
31
30
  * @returns Promise that resolves with updated user data
32
31
  */
33
32
  export declare function updateProfileWithAvatar(updates: Partial<User>, oxyServices: OxyServices, activeSessionId: string | null, queryClient: QueryClient, options?: {
34
- syncIdentity?: () => Promise<User>;
35
33
  deviceId?: string;
36
34
  }): Promise<User>;
37
35
  //# sourceMappingURL=avatarUtils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"avatarUtils.d.ts","sourceRoot":"","sources":["../../../../src/ui/utils/avatarUtils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAEpD,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAGpD;;;;;;;;GAQG;AACH,wBAAsB,sBAAsB,CAC1C,MAAM,EAAE,MAAM,GAAG,SAAS,EAC1B,WAAW,EAAE,WAAW,EACxB,WAAW,GAAE,MAAsB,GAClC,OAAO,CAAC,IAAI,CAAC,CAcf;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAClC,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,MAAM,EACpB,WAAW,EAAE,WAAW,GACvB,IAAI,CAON;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,uBAAuB,CAC3C,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,EACtB,WAAW,EAAE,WAAW,EACxB,eAAe,EAAE,MAAM,GAAG,IAAI,EAC9B,WAAW,EAAE,WAAW,EACxB,OAAO,CAAC,EAAE;IAAE,YAAY,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,GAClE,OAAO,CAAC,IAAI,CAAC,CAwEf"}
1
+ {"version":3,"file":"avatarUtils.d.ts","sourceRoot":"","sources":["../../../../src/ui/utils/avatarUtils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAEpD,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAGpD;;;;;;;;GAQG;AACH,wBAAsB,sBAAsB,CAC1C,MAAM,EAAE,MAAM,GAAG,SAAS,EAC1B,WAAW,EAAE,WAAW,EACxB,WAAW,GAAE,MAAsB,GAClC,OAAO,CAAC,IAAI,CAAC,CAcf;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAClC,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,MAAM,EACpB,WAAW,EAAE,WAAW,GACvB,IAAI,CAON;AAED;;;;;;;;;GASG;AACH,wBAAsB,uBAAuB,CAC3C,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,EACtB,WAAW,EAAE,WAAW,EACxB,eAAe,EAAE,MAAM,GAAG,IAAI,EAC9B,WAAW,EAAE,WAAW,EACxB,OAAO,CAAC,EAAE;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,GAC9B,OAAO,CAAC,IAAI,CAAC,CAyCf"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oxyhq/services",
3
- "version": "5.17.7",
3
+ "version": "5.17.9",
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",
@@ -111,7 +111,7 @@
111
111
  "sonner": "^2.0.4",
112
112
  "sonner-native": "^0.20.0",
113
113
  "zod": "^3.25.64",
114
- "zustand": "^5.0.6"
114
+ "zustand": "^5.0.9"
115
115
  },
116
116
  "devDependencies": {
117
117
  "@biomejs/biome": "^1.9.4",
@@ -1,22 +1,14 @@
1
1
  /**
2
2
  * Oxy Crypto Module
3
3
  *
4
- * Provides cryptographic identity management for the Oxy ecosystem.
5
- * Handles key generation, secure storage, and digital signatures.
4
+ * Provides type definitions and polyfills for crypto operations.
5
+ * Identity management (KeyManager, SignatureService) belongs ONLY in the Accounts app.
6
6
  */
7
7
 
8
8
  // Import polyfills first - this ensures Buffer is available for crypto libraries
9
9
  import './polyfill';
10
10
 
11
- export { KeyManager, type KeyPair } from './keyManager';
12
- export {
13
- SignatureService,
14
- type SignedMessage,
15
- type AuthChallenge
16
- } from './signatureService';
11
+ // Only export types - actual identity operations are in Accounts app
17
12
  export { type BackupData } from './types';
18
13
 
19
- // Re-export for convenience
20
- export { KeyManager as default } from './keyManager';
21
-
22
14
 
@@ -1,10 +1,10 @@
1
1
  /**
2
- * Cryptographic types for identity management
2
+ * Cryptographic types for authentication and backup
3
3
  */
4
4
 
5
5
  /**
6
6
  * Encrypted backup data structure
7
- * Used for identity backup files and QR code transfers
7
+ * Used for identity backup files
8
8
  */
9
9
  export interface BackupData {
10
10
  /** Base64-encoded encrypted private key */
@@ -15,5 +15,9 @@ export interface BackupData {
15
15
  iv: string;
16
16
  /** Public key associated with the encrypted private key */
17
17
  publicKey: string;
18
+ /** Encryption algorithm used (optional, for backward compatibility) */
19
+ algorithm?: 'xor' | 'aes-256-gcm';
20
+ /** Format version (optional, for backward compatibility) */
21
+ version?: string;
18
22
  }
19
23
 
package/src/index.ts CHANGED
@@ -4,26 +4,21 @@
4
4
  * This exports everything but uses environment detection to avoid crashes.
5
5
  * - Frontend: Full UI + Core functionality
6
6
  * - Backend: Core functionality only (UI components are no-ops)
7
+ *
8
+ * NOTE: Identity management (KeyManager, SignatureService) belongs ONLY in the Accounts app.
9
+ * Services SDK handles tokens/sessions, NOT identity.
7
10
  */
8
11
 
9
12
  // IMPORTANT: Import crypto module first to ensure polyfills are loaded
10
13
  // before any other code that might use Buffer or other polyfilled APIs
11
14
  import './crypto/polyfill';
12
15
 
13
- // Crypto/Identity exports (must be before core to ensure polyfills are available)
14
- export {
15
- KeyManager,
16
- SignatureService
17
- } from './crypto';
18
-
19
16
  // Core exports
20
17
  export { OxyServices, OxyAuthenticationError, OxyAuthenticationTimeoutError } from './core';
21
18
  export { OXY_CLOUD_URL, oxyClient } from './core';
22
- export type {
23
- KeyPair,
24
- SignedMessage,
25
- AuthChallenge
26
- } from './crypto';
19
+
20
+ // Type exports from crypto (types only - no identity implementation)
21
+ export type { BackupData } from './crypto';
27
22
 
28
23
  // React context
29
24
  export { useOxy } from './ui/context/OxyContext';
@@ -125,7 +125,7 @@ const Icon = ({
125
125
  ? source.source
126
126
  : source;
127
127
  const iconColor =
128
- color || (theme.isV3 ? theme.colors.onSurface : (theme.colors.text || theme.colors.onSurface));
128
+ color || (theme.isV3 ? theme.colors.onSurface : ((theme.colors as any).text || theme.colors.onSurface));
129
129
 
130
130
  if (isImageSource(s)) {
131
131
  return (
@@ -124,7 +124,7 @@ const getIconColor = ({
124
124
  return customIconColor;
125
125
  }
126
126
 
127
- return theme.colors.text || theme.colors.onSurface;
127
+ return (theme.colors as any).text || theme.colors.onSurface;
128
128
  };
129
129
 
130
130
  const getRippleColor = ({
@@ -33,7 +33,7 @@ export function getTextColor({ theme, disabled }: BaseProps) {
33
33
  return theme.colors.onSurfaceVariant;
34
34
  }
35
35
  // For non-V3 themes, apply opacity to text color
36
- const textColor = theme?.colors?.onSurface || theme?.colors?.text || '#000000';
36
+ const textColor = theme?.colors?.onSurface || (theme?.colors as any)?.text || '#000000';
37
37
  const opacity = theme.dark ? 0.7 : 0.54;
38
38
  return hexToRgba(textColor, opacity);
39
39
  }
@@ -55,7 +55,7 @@ export function getIconColor({
55
55
  }
56
56
 
57
57
  if (!theme.isV3) {
58
- return theme.colors.text || theme.colors.onSurface;
58
+ return (theme.colors as any).text || theme.colors.onSurface;
59
59
  }
60
60
 
61
61
  if (disabled) {
@@ -329,10 +329,10 @@ const getInputTextColor = ({
329
329
  }
330
330
 
331
331
  if (disabled) {
332
- return color(theme.colors.text || theme.colors.onSurface).alpha(0.54).rgb().string();
332
+ return color((theme.colors as any).text || theme.colors.onSurface).alpha(0.54).rgb().string();
333
333
  }
334
334
 
335
- return theme.colors.text || theme.colors.onSurface;
335
+ return (theme.colors as any).text || theme.colors.onSurface;
336
336
  };
337
337
 
338
338
  const getActiveColor = ({
@@ -364,7 +364,7 @@ const getActiveColor = ({
364
364
  return theme.colors.onSurfaceDisabled;
365
365
  }
366
366
 
367
- return color(theme.colors.text || theme.colors.onSurface).alpha(0.54).rgb().string();
367
+ return color((theme.colors as any).text || theme.colors.onSurface).alpha(0.54).rgb().string();
368
368
  }
369
369
 
370
370
  return theme.colors.primary;
@@ -380,10 +380,10 @@ const getPlaceholderColor = ({ theme, disabled }: BaseProps) => {
380
380
  }
381
381
 
382
382
  if (disabled) {
383
- return theme.colors.disabled || theme.colors.onSurfaceDisabled;
383
+ return (theme.colors as any).disabled || theme.colors.onSurfaceDisabled;
384
384
  }
385
385
 
386
- return theme.colors.placeholder || theme.colors.onSurfaceVariant;
386
+ return (theme.colors as any).placeholder || theme.colors.onSurfaceVariant;
387
387
  };
388
388
 
389
389
  const getSelectionColor = ({
@@ -443,7 +443,7 @@ const getFlatUnderlineColor = ({
443
443
  return 'transparent';
444
444
  }
445
445
 
446
- return theme.colors.disabled || theme.colors.onSurfaceVariant;
446
+ return (theme.colors as any).disabled || theme.colors.onSurfaceVariant;
447
447
  };
448
448
 
449
449
  const getOutlinedOutlineInputColor = ({
@@ -472,9 +472,9 @@ const getOutlinedOutlineInputColor = ({
472
472
  if (isTransparent) {
473
473
  return customOutlineColor;
474
474
  }
475
- return theme.colors.disabled || theme.colors.onSurfaceDisabled;
475
+ return (theme.colors as any).disabled || theme.colors.onSurfaceDisabled;
476
476
  }
477
- return theme.colors.placeholder || theme.colors.onSurfaceVariant;
477
+ return (theme.colors as any).placeholder || theme.colors.onSurfaceVariant;
478
478
  };
479
479
 
480
480
  export const getFlatInputColors = ({
@@ -40,9 +40,9 @@ const getRippleColor = ({
40
40
  }
41
41
 
42
42
  if (theme.dark) {
43
- return colorUtil(theme.colors.onSurface || theme.colors.text || '#000000').alpha(0.32).rgb().string();
43
+ return colorUtil(theme.colors.onSurface || (theme.colors as any).text || '#000000').alpha(0.32).rgb().string();
44
44
  }
45
- return colorUtil(theme.colors.text || theme.colors.onSurface || '#000000').alpha(0.2).rgb().string();
45
+ return colorUtil((theme.colors as any).text || theme.colors.onSurface || '#000000').alpha(0.2).rgb().string();
46
46
  };
47
47
 
48
48
  export const getTouchableRippleColors = ({
@@ -72,10 +72,10 @@ const AnimatedText = forwardRef<Text & HTMLElement, Props<never>>(
72
72
  />
73
73
  );
74
74
  } else {
75
- const font = !theme.isV3 ? (theme.fonts.regular || theme.fonts.default) : theme.fonts.bodyMedium;
75
+ const font = !theme.isV3 ? ((theme.fonts as any).regular || theme.fonts.default) : theme.fonts.bodyMedium;
76
76
  const textStyle = {
77
77
  ...font,
78
- color: theme.isV3 ? theme.colors.onSurface : (theme.colors.text || theme.colors.onSurface),
78
+ color: theme.isV3 ? theme.colors.onSurface : ((theme.colors as any).text || theme.colors.onSurface),
79
79
  };
80
80
  return (
81
81
  <Animated.Text
@@ -55,10 +55,6 @@ export type InternalTheme = {
55
55
  level4: string;
56
56
  level5: string;
57
57
  };
58
- // Legacy properties for backward compatibility
59
- text?: string;
60
- disabled?: string;
61
- placeholder?: string;
62
58
  };
63
59
  fonts: {
64
60
  displayLarge: any;
@@ -77,8 +73,6 @@ export type InternalTheme = {
77
73
  bodyMedium: any;
78
74
  bodySmall: any;
79
75
  default: any;
80
- // Legacy property for backward compatibility
81
- regular?: any;
82
76
  };
83
77
  };
84
78