@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.
- package/lib/commonjs/crypto/index.js +0 -23
- package/lib/commonjs/crypto/index.js.map +1 -1
- package/lib/commonjs/index.js +0 -15
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/ui/components/Icon.js.map +1 -1
- package/lib/commonjs/ui/components/IconButton/utils.js.map +1 -1
- package/lib/commonjs/ui/components/TextField/Adornment/utils.js.map +1 -1
- package/lib/commonjs/ui/components/TextField/helpers.js.map +1 -1
- package/lib/commonjs/ui/components/TouchableRipple/utils.js.map +1 -1
- package/lib/commonjs/ui/components/Typography/AnimatedText.js.map +1 -1
- package/lib/commonjs/ui/context/OxyContext.js +37 -589
- package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
- package/lib/commonjs/ui/context/OxyContextBase.js.map +1 -1
- package/lib/commonjs/ui/context/hooks/useAuthOperations.js +60 -425
- package/lib/commonjs/ui/context/hooks/useAuthOperations.js.map +1 -1
- package/lib/commonjs/ui/hooks/mutations/useAccountMutations.js +8 -112
- package/lib/commonjs/ui/hooks/mutations/useAccountMutations.js.map +1 -1
- package/lib/commonjs/ui/hooks/queries/useAccountQueries.js +2 -27
- package/lib/commonjs/ui/hooks/queries/useAccountQueries.js.map +1 -1
- package/lib/commonjs/ui/hooks/queries/useServicesQueries.js +2 -27
- package/lib/commonjs/ui/hooks/queries/useServicesQueries.js.map +1 -1
- package/lib/commonjs/ui/hooks/useSessionSocket.js +2 -88
- package/lib/commonjs/ui/hooks/useSessionSocket.js.map +1 -1
- package/lib/commonjs/ui/screens/OxyAuthScreen.js +0 -1
- package/lib/commonjs/ui/screens/OxyAuthScreen.js.map +1 -1
- package/lib/commonjs/ui/stores/authStore.js +52 -15
- package/lib/commonjs/ui/stores/authStore.js.map +1 -1
- package/lib/commonjs/ui/utils/avatarUtils.js +2 -32
- package/lib/commonjs/ui/utils/avatarUtils.js.map +1 -1
- package/lib/module/crypto/index.js +4 -6
- package/lib/module/crypto/index.js.map +1 -1
- package/lib/module/index.js +6 -3
- package/lib/module/index.js.map +1 -1
- package/lib/module/ui/components/Icon.js.map +1 -1
- package/lib/module/ui/components/IconButton/utils.js.map +1 -1
- package/lib/module/ui/components/TextField/Adornment/utils.js.map +1 -1
- package/lib/module/ui/components/TextField/helpers.js.map +1 -1
- package/lib/module/ui/components/TouchableRipple/utils.js.map +1 -1
- package/lib/module/ui/components/Typography/AnimatedText.js.map +1 -1
- package/lib/module/ui/context/OxyContext.js +35 -588
- package/lib/module/ui/context/OxyContext.js.map +1 -1
- package/lib/module/ui/context/OxyContextBase.js.map +1 -1
- package/lib/module/ui/context/hooks/useAuthOperations.js +60 -424
- package/lib/module/ui/context/hooks/useAuthOperations.js.map +1 -1
- package/lib/module/ui/hooks/mutations/useAccountMutations.js +8 -112
- package/lib/module/ui/hooks/mutations/useAccountMutations.js.map +1 -1
- package/lib/module/ui/hooks/queries/useAccountQueries.js +2 -27
- package/lib/module/ui/hooks/queries/useAccountQueries.js.map +1 -1
- package/lib/module/ui/hooks/queries/useServicesQueries.js +2 -27
- package/lib/module/ui/hooks/queries/useServicesQueries.js.map +1 -1
- package/lib/module/ui/hooks/useSessionSocket.js +2 -88
- package/lib/module/ui/hooks/useSessionSocket.js.map +1 -1
- package/lib/module/ui/screens/OxyAuthScreen.js +0 -1
- package/lib/module/ui/screens/OxyAuthScreen.js.map +1 -1
- package/lib/module/ui/stores/authStore.js +52 -15
- package/lib/module/ui/stores/authStore.js.map +1 -1
- package/lib/module/ui/utils/avatarUtils.js +2 -32
- package/lib/module/ui/utils/avatarUtils.js.map +1 -1
- package/lib/typescript/crypto/index.d.ts +2 -5
- package/lib/typescript/crypto/index.d.ts.map +1 -1
- package/lib/typescript/crypto/types.d.ts +6 -2
- package/lib/typescript/crypto/types.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +4 -2
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/ui/components/IconButton/utils.d.ts +1 -1
- package/lib/typescript/ui/components/TextField/Adornment/utils.d.ts +1 -1
- package/lib/typescript/ui/components/TextField/Adornment/utils.d.ts.map +1 -1
- package/lib/typescript/ui/components/TextField/helpers.d.ts +6 -6
- package/lib/typescript/ui/components/types.d.ts +0 -4
- package/lib/typescript/ui/components/types.d.ts.map +1 -1
- package/lib/typescript/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/ui/context/OxyContextBase.d.ts +2 -39
- package/lib/typescript/ui/context/OxyContextBase.d.ts.map +1 -1
- package/lib/typescript/ui/context/hooks/useAuthOperations.d.ts +10 -25
- package/lib/typescript/ui/context/hooks/useAuthOperations.d.ts.map +1 -1
- package/lib/typescript/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
- package/lib/typescript/ui/hooks/queries/useAccountQueries.d.ts.map +1 -1
- package/lib/typescript/ui/hooks/queries/useServicesQueries.d.ts.map +1 -1
- package/lib/typescript/ui/hooks/useSessionSocket.d.ts +1 -14
- package/lib/typescript/ui/hooks/useSessionSocket.d.ts.map +1 -1
- package/lib/typescript/ui/stores/authStore.d.ts +27 -4
- package/lib/typescript/ui/stores/authStore.d.ts.map +1 -1
- package/lib/typescript/ui/utils/avatarUtils.d.ts +0 -2
- package/lib/typescript/ui/utils/avatarUtils.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/crypto/index.ts +3 -11
- package/src/crypto/types.ts +6 -2
- package/src/index.ts +6 -11
- package/src/ui/components/Icon.tsx +1 -1
- package/src/ui/components/IconButton/utils.ts +1 -1
- package/src/ui/components/TextField/Adornment/utils.ts +2 -2
- package/src/ui/components/TextField/helpers.tsx +8 -8
- package/src/ui/components/TouchableRipple/utils.ts +2 -2
- package/src/ui/components/Typography/AnimatedText.tsx +2 -2
- package/src/ui/components/types.tsx +0 -6
- package/src/ui/context/OxyContext.tsx +33 -637
- package/src/ui/context/OxyContextBase.tsx +5 -23
- package/src/ui/context/hooks/useAuthOperations.ts +84 -460
- package/src/ui/hooks/mutations/useAccountMutations.ts +12 -110
- package/src/ui/hooks/queries/useAccountQueries.ts +3 -27
- package/src/ui/hooks/queries/useServicesQueries.ts +3 -27
- package/src/ui/hooks/useSessionSocket.ts +2 -106
- package/src/ui/screens/OxyAuthScreen.tsx +1 -1
- package/src/ui/stores/authStore.ts +57 -18
- package/src/ui/utils/avatarUtils.ts +4 -36
- package/lib/commonjs/crypto/keyManager.js +0 -511
- package/lib/commonjs/crypto/keyManager.js.map +0 -1
- package/lib/commonjs/crypto/signatureService.js +0 -269
- package/lib/commonjs/crypto/signatureService.js.map +0 -1
- package/lib/module/crypto/keyManager.js +0 -508
- package/lib/module/crypto/keyManager.js.map +0 -1
- package/lib/module/crypto/signatureService.js +0 -266
- package/lib/module/crypto/signatureService.js.map +0 -1
- package/lib/typescript/crypto/keyManager.d.ts +0 -97
- package/lib/typescript/crypto/keyManager.d.ts.map +0 -1
- package/lib/typescript/crypto/signatureService.d.ts +0 -77
- package/lib/typescript/crypto/signatureService.d.ts.map +0 -1
- package/src/crypto/keyManager.ts +0 -545
- 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
|
-
/**
|
|
32
|
-
|
|
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
|
|
56
|
-
*
|
|
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,
|
|
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,
|
|
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,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAGnF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEjD,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,SA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;AAMD;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB,GAAI,qQAkB/B,wBAAwB,KAAG,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;;
|
|
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,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AAI,UAAU;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,
|
|
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,EAAE,UAAU;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,2EAqB3E,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,UAAU,GAAI,WAAW,MAAM,GAAG,IAAI,EAAE,UAAU;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,yEA6BnF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iBAAiB,GAAI,UAAU;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,iEAgBhE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,cAAc,GAAI,UAAU;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,iEAoC7D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,GAAI,UAAU;IAAE,OAAO,CAAC,EAAE,OAAO,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,
|
|
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,CAAC;IACpC,eAAe,CAAC,EAAE,
|
|
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,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
|
-
|
|
6
|
-
isSyncing: boolean;
|
|
30
|
+
setOnline: (online: boolean) => void;
|
|
7
31
|
loginSuccess: () => void;
|
|
8
32
|
loginFailure: (error: string) => void;
|
|
9
33
|
logout: () => void;
|
|
10
|
-
|
|
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":"
|
|
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
|
|
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.
|
|
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.
|
|
114
|
+
"zustand": "^5.0.9"
|
|
115
115
|
},
|
|
116
116
|
"devDependencies": {
|
|
117
117
|
"@biomejs/biome": "^1.9.4",
|
package/src/crypto/index.ts
CHANGED
|
@@ -1,22 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Oxy Crypto Module
|
|
3
3
|
*
|
|
4
|
-
* Provides
|
|
5
|
-
*
|
|
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
|
|
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
|
|
package/src/crypto/types.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Cryptographic types for
|
|
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
|
|
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
|
-
|
|
23
|
-
|
|
24
|
-
|
|
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 (
|
|
@@ -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
|
|