@oxyhq/services 14.1.0 → 16.0.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.
- package/lib/commonjs/index.js +4 -21
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/ui/components/SignInAccountChooser.js +189 -0
- package/lib/commonjs/ui/components/SignInAccountChooser.js.map +1 -0
- package/lib/commonjs/ui/components/SignInModal.js +350 -131
- package/lib/commonjs/ui/components/SignInModal.js.map +1 -1
- package/lib/commonjs/ui/context/OxyContext.js +340 -1547
- package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
- package/lib/commonjs/ui/context/hooks/useAuthOperations.js +61 -64
- package/lib/commonjs/ui/context/hooks/useAuthOperations.js.map +1 -1
- package/lib/commonjs/ui/hooks/mutations/mutationKeys.js +1 -1
- package/lib/commonjs/ui/hooks/mutations/useAccountMutations.js +9 -9
- package/lib/commonjs/ui/hooks/mutations/useAccountMutations.js.map +1 -1
- package/lib/commonjs/ui/hooks/queries/queryKeys.js +1 -1
- package/lib/commonjs/ui/hooks/queries/useAccountQueries.js +7 -8
- package/lib/commonjs/ui/hooks/queries/useAccountQueries.js.map +1 -1
- package/lib/commonjs/ui/hooks/useAuth.js +14 -33
- package/lib/commonjs/ui/hooks/useAuth.js.map +1 -1
- package/lib/commonjs/ui/hooks/usePasswordSignIn.js +170 -0
- package/lib/commonjs/ui/hooks/usePasswordSignIn.js.map +1 -0
- package/lib/commonjs/ui/hooks/useProfileEditing.js +2 -5
- package/lib/commonjs/ui/hooks/useProfileEditing.js.map +1 -1
- package/lib/commonjs/ui/hooks/useSessionManagement.js +2 -2
- package/lib/commonjs/ui/hooks/useSessionManagement.js.map +1 -1
- package/lib/commonjs/ui/navigation/routes.js +1 -0
- package/lib/commonjs/ui/navigation/routes.js.map +1 -1
- package/lib/commonjs/ui/screens/ConnectedAppsScreen.js +17 -18
- package/lib/commonjs/ui/screens/ConnectedAppsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/EditProfileFieldScreen.js +93 -68
- package/lib/commonjs/ui/screens/EditProfileFieldScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/EditProfileScreen.js +187 -0
- package/lib/commonjs/ui/screens/EditProfileScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/ManageAccountScreen.js +3 -7
- package/lib/commonjs/ui/screens/ManageAccountScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/OxyAuthScreen.js +231 -95
- package/lib/commonjs/ui/screens/OxyAuthScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ProfileScreen.js +15 -2
- package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/linkFormat.js +38 -0
- package/lib/commonjs/ui/screens/linkFormat.js.map +1 -0
- package/lib/commonjs/ui/session/authStore.js +146 -0
- package/lib/commonjs/ui/session/authStore.js.map +1 -0
- package/lib/commonjs/ui/session/createSessionClient.js +23 -17
- package/lib/commonjs/ui/session/createSessionClient.js.map +1 -1
- package/lib/commonjs/ui/session/index.js +13 -7
- package/lib/commonjs/ui/session/index.js.map +1 -1
- package/lib/commonjs/ui/session/tokenTransport.js +19 -31
- package/lib/commonjs/ui/session/tokenTransport.js.map +1 -1
- package/lib/commonjs/ui/utils/isWebBrowser.js +13 -0
- package/lib/commonjs/ui/utils/isWebBrowser.js.map +1 -0
- package/lib/commonjs/utils/deviceFlowSignIn.js +13 -16
- package/lib/commonjs/utils/deviceFlowSignIn.js.map +1 -1
- package/lib/module/index.js +2 -7
- package/lib/module/index.js.map +1 -1
- package/lib/module/ui/components/SignInAccountChooser.js +183 -0
- package/lib/module/ui/components/SignInAccountChooser.js.map +1 -0
- package/lib/module/ui/components/SignInModal.js +352 -134
- package/lib/module/ui/components/SignInModal.js.map +1 -1
- package/lib/module/ui/context/OxyContext.js +342 -1551
- package/lib/module/ui/context/OxyContext.js.map +1 -1
- package/lib/module/ui/context/hooks/useAuthOperations.js +60 -63
- package/lib/module/ui/context/hooks/useAuthOperations.js.map +1 -1
- package/lib/module/ui/hooks/mutations/mutationKeys.js +1 -1
- package/lib/module/ui/hooks/mutations/useAccountMutations.js +7 -7
- package/lib/module/ui/hooks/mutations/useAccountMutations.js.map +1 -1
- package/lib/module/ui/hooks/queries/queryKeys.js +1 -1
- package/lib/module/ui/hooks/queries/useAccountQueries.js +5 -6
- package/lib/module/ui/hooks/queries/useAccountQueries.js.map +1 -1
- package/lib/module/ui/hooks/useAuth.js +14 -33
- package/lib/module/ui/hooks/useAuth.js.map +1 -1
- package/lib/module/ui/hooks/usePasswordSignIn.js +165 -0
- package/lib/module/ui/hooks/usePasswordSignIn.js.map +1 -0
- package/lib/module/ui/hooks/useProfileEditing.js +2 -5
- package/lib/module/ui/hooks/useProfileEditing.js.map +1 -1
- package/lib/module/ui/hooks/useSessionManagement.js +1 -1
- package/lib/module/ui/hooks/useSessionManagement.js.map +1 -1
- package/lib/module/ui/navigation/routes.js +1 -0
- package/lib/module/ui/navigation/routes.js.map +1 -1
- package/lib/module/ui/screens/ConnectedAppsScreen.js +19 -20
- package/lib/module/ui/screens/ConnectedAppsScreen.js.map +1 -1
- package/lib/module/ui/screens/EditProfileFieldScreen.js +91 -66
- package/lib/module/ui/screens/EditProfileFieldScreen.js.map +1 -1
- package/lib/module/ui/screens/EditProfileScreen.js +182 -0
- package/lib/module/ui/screens/EditProfileScreen.js.map +1 -0
- package/lib/module/ui/screens/ManageAccountScreen.js +3 -7
- package/lib/module/ui/screens/ManageAccountScreen.js.map +1 -1
- package/lib/module/ui/screens/OxyAuthScreen.js +233 -97
- package/lib/module/ui/screens/OxyAuthScreen.js.map +1 -1
- package/lib/module/ui/screens/ProfileScreen.js +15 -2
- package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/module/ui/screens/linkFormat.js +31 -0
- package/lib/module/ui/screens/linkFormat.js.map +1 -0
- package/lib/module/ui/session/authStore.js +143 -0
- package/lib/module/ui/session/authStore.js.map +1 -0
- package/lib/module/ui/session/createSessionClient.js +22 -16
- package/lib/module/ui/session/createSessionClient.js.map +1 -1
- package/lib/module/ui/session/index.js +9 -9
- package/lib/module/ui/session/index.js.map +1 -1
- package/lib/module/ui/session/tokenTransport.js +20 -33
- package/lib/module/ui/session/tokenTransport.js.map +1 -1
- package/lib/module/ui/utils/isWebBrowser.js +11 -0
- package/lib/module/ui/utils/isWebBrowser.js.map +1 -0
- package/lib/module/utils/deviceFlowSignIn.js +14 -17
- package/lib/module/utils/deviceFlowSignIn.js.map +1 -1
- package/lib/typescript/commonjs/index.d.ts +2 -3
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/SignInAccountChooser.d.ts +29 -0
- package/lib/typescript/commonjs/ui/components/SignInAccountChooser.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/SignInModal.d.ts +15 -10
- package/lib/typescript/commonjs/ui/components/SignInModal.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/OxyContext.d.ts +36 -42
- package/lib/typescript/commonjs/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/hooks/useAuthOperations.d.ts +18 -23
- package/lib/typescript/commonjs/ui/context/hooks/useAuthOperations.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/mutations/useAccountMutations.d.ts +4 -6
- package/lib/typescript/commonjs/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/queries/useAccountQueries.d.ts +6 -7
- package/lib/typescript/commonjs/ui/hooks/queries/useAccountQueries.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useAuth.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/usePasswordSignIn.d.ts +31 -0
- package/lib/typescript/commonjs/ui/hooks/usePasswordSignIn.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/hooks/useProfileEditing.d.ts +0 -1
- package/lib/typescript/commonjs/ui/hooks/useProfileEditing.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/navigation/routes.d.ts +1 -1
- package/lib/typescript/commonjs/ui/navigation/routes.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/ConnectedAppsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/EditProfileFieldScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/EditProfileScreen.d.ts +14 -0
- package/lib/typescript/commonjs/ui/screens/EditProfileScreen.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/screens/ManageAccountScreen.d.ts +1 -1
- package/lib/typescript/commonjs/ui/screens/ManageAccountScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/OxyAuthScreen.d.ts +13 -12
- package/lib/typescript/commonjs/ui/screens/OxyAuthScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/ProfileScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/linkFormat.d.ts +23 -0
- package/lib/typescript/commonjs/ui/screens/linkFormat.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/session/authStore.d.ts +33 -0
- package/lib/typescript/commonjs/ui/session/authStore.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/session/createSessionClient.d.ts +19 -15
- package/lib/typescript/commonjs/ui/session/createSessionClient.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/session/index.d.ts +9 -9
- package/lib/typescript/commonjs/ui/session/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/session/tokenTransport.d.ts +13 -19
- package/lib/typescript/commonjs/ui/session/tokenTransport.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/utils/isWebBrowser.d.ts +9 -0
- package/lib/typescript/commonjs/ui/utils/isWebBrowser.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/utils/storageHelpers.d.ts +7 -7
- package/lib/typescript/commonjs/utils/deviceFlowSignIn.d.ts +15 -13
- package/lib/typescript/commonjs/utils/deviceFlowSignIn.d.ts.map +1 -1
- package/lib/typescript/module/index.d.ts +2 -3
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/SignInAccountChooser.d.ts +29 -0
- package/lib/typescript/module/ui/components/SignInAccountChooser.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/SignInModal.d.ts +15 -10
- package/lib/typescript/module/ui/components/SignInModal.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/OxyContext.d.ts +36 -42
- package/lib/typescript/module/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/hooks/useAuthOperations.d.ts +18 -23
- package/lib/typescript/module/ui/context/hooks/useAuthOperations.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/mutations/useAccountMutations.d.ts +4 -6
- package/lib/typescript/module/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/queries/useAccountQueries.d.ts +6 -7
- package/lib/typescript/module/ui/hooks/queries/useAccountQueries.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useAuth.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/usePasswordSignIn.d.ts +31 -0
- package/lib/typescript/module/ui/hooks/usePasswordSignIn.d.ts.map +1 -0
- package/lib/typescript/module/ui/hooks/useProfileEditing.d.ts +0 -1
- package/lib/typescript/module/ui/hooks/useProfileEditing.d.ts.map +1 -1
- package/lib/typescript/module/ui/navigation/routes.d.ts +1 -1
- package/lib/typescript/module/ui/navigation/routes.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/ConnectedAppsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/EditProfileFieldScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/EditProfileScreen.d.ts +14 -0
- package/lib/typescript/module/ui/screens/EditProfileScreen.d.ts.map +1 -0
- package/lib/typescript/module/ui/screens/ManageAccountScreen.d.ts +1 -1
- package/lib/typescript/module/ui/screens/ManageAccountScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/OxyAuthScreen.d.ts +13 -12
- package/lib/typescript/module/ui/screens/OxyAuthScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/ProfileScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/linkFormat.d.ts +23 -0
- package/lib/typescript/module/ui/screens/linkFormat.d.ts.map +1 -0
- package/lib/typescript/module/ui/session/authStore.d.ts +33 -0
- package/lib/typescript/module/ui/session/authStore.d.ts.map +1 -0
- package/lib/typescript/module/ui/session/createSessionClient.d.ts +19 -15
- package/lib/typescript/module/ui/session/createSessionClient.d.ts.map +1 -1
- package/lib/typescript/module/ui/session/index.d.ts +9 -9
- package/lib/typescript/module/ui/session/index.d.ts.map +1 -1
- package/lib/typescript/module/ui/session/tokenTransport.d.ts +13 -19
- package/lib/typescript/module/ui/session/tokenTransport.d.ts.map +1 -1
- package/lib/typescript/module/ui/utils/isWebBrowser.d.ts +9 -0
- package/lib/typescript/module/ui/utils/isWebBrowser.d.ts.map +1 -0
- package/lib/typescript/module/ui/utils/storageHelpers.d.ts +7 -7
- package/lib/typescript/module/utils/deviceFlowSignIn.d.ts +15 -13
- package/lib/typescript/module/utils/deviceFlowSignIn.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/index.ts +2 -6
- package/src/ui/components/SignInAccountChooser.tsx +162 -0
- package/src/ui/components/SignInModal.tsx +309 -139
- package/src/ui/context/OxyContext.tsx +532 -1785
- package/src/ui/context/hooks/useAuthOperations.ts +65 -76
- package/src/ui/hooks/mutations/mutationKeys.ts +1 -1
- package/src/ui/hooks/mutations/useAccountMutations.ts +7 -7
- package/src/ui/hooks/queries/queryKeys.ts +1 -1
- package/src/ui/hooks/queries/useAccountQueries.ts +8 -9
- package/src/ui/hooks/useAuth.ts +14 -35
- package/src/ui/hooks/usePasswordSignIn.ts +207 -0
- package/src/ui/hooks/useProfileEditing.ts +2 -8
- package/src/ui/hooks/useSessionManagement.ts +1 -1
- package/src/ui/navigation/routes.ts +3 -1
- package/src/ui/screens/ConnectedAppsScreen.tsx +23 -24
- package/src/ui/screens/EditProfileFieldScreen.tsx +102 -66
- package/src/ui/screens/EditProfileScreen.tsx +155 -0
- package/src/ui/screens/ManageAccountScreen.tsx +3 -7
- package/src/ui/screens/OxyAuthScreen.tsx +259 -112
- package/src/ui/screens/ProfileScreen.tsx +15 -2
- package/src/ui/screens/__tests__/linkFormat.test.ts +73 -0
- package/src/ui/screens/linkFormat.ts +37 -0
- package/src/ui/session/__tests__/createSessionClient.test.ts +22 -7
- package/src/ui/session/__tests__/tokenTransport.test.ts +37 -49
- package/src/ui/session/authStore.ts +164 -0
- package/src/ui/session/createSessionClient.ts +30 -17
- package/src/ui/session/index.ts +10 -9
- package/src/ui/session/tokenTransport.ts +26 -36
- package/src/ui/utils/isWebBrowser.ts +8 -0
- package/src/ui/utils/storageHelpers.ts +7 -7
- package/src/utils/__tests__/deviceFlowSignIn.test.ts +50 -131
- package/src/utils/deviceFlowSignIn.ts +19 -26
- package/lib/commonjs/ui/context/inSessionTokenRefresh.js +0 -243
- package/lib/commonjs/ui/context/inSessionTokenRefresh.js.map +0 -1
- package/lib/commonjs/ui/context/silentSessionRestore.js +0 -56
- package/lib/commonjs/ui/context/silentSessionRestore.js.map +0 -1
- package/lib/commonjs/ui/hooks/useWebSSO.js +0 -28
- package/lib/commonjs/ui/hooks/useWebSSO.js.map +0 -1
- package/lib/commonjs/ui/session/projectSessionState.js +0 -86
- package/lib/commonjs/ui/session/projectSessionState.js.map +0 -1
- package/lib/commonjs/ui/session/sessionClientHost.js +0 -30
- package/lib/commonjs/ui/session/sessionClientHost.js.map +0 -1
- package/lib/commonjs/ui/utils/activeAuthuser.js +0 -142
- package/lib/commonjs/ui/utils/activeAuthuser.js.map +0 -1
- package/lib/commonjs/utils/crossApex.js +0 -74
- package/lib/commonjs/utils/crossApex.js.map +0 -1
- package/lib/module/ui/context/inSessionTokenRefresh.js +0 -238
- package/lib/module/ui/context/inSessionTokenRefresh.js.map +0 -1
- package/lib/module/ui/context/silentSessionRestore.js +0 -53
- package/lib/module/ui/context/silentSessionRestore.js.map +0 -1
- package/lib/module/ui/hooks/useWebSSO.js +0 -24
- package/lib/module/ui/hooks/useWebSSO.js.map +0 -1
- package/lib/module/ui/session/projectSessionState.js +0 -79
- package/lib/module/ui/session/projectSessionState.js.map +0 -1
- package/lib/module/ui/session/sessionClientHost.js +0 -26
- package/lib/module/ui/session/sessionClientHost.js.map +0 -1
- package/lib/module/ui/utils/activeAuthuser.js +0 -134
- package/lib/module/ui/utils/activeAuthuser.js.map +0 -1
- package/lib/module/utils/crossApex.js +0 -69
- package/lib/module/utils/crossApex.js.map +0 -1
- package/lib/typescript/commonjs/ui/context/inSessionTokenRefresh.d.ts +0 -106
- package/lib/typescript/commonjs/ui/context/inSessionTokenRefresh.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/context/silentSessionRestore.d.ts +0 -36
- package/lib/typescript/commonjs/ui/context/silentSessionRestore.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/hooks/useWebSSO.d.ts +0 -19
- package/lib/typescript/commonjs/ui/hooks/useWebSSO.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/session/projectSessionState.d.ts +0 -45
- package/lib/typescript/commonjs/ui/session/projectSessionState.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/session/sessionClientHost.d.ts +0 -14
- package/lib/typescript/commonjs/ui/session/sessionClientHost.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/utils/activeAuthuser.d.ts +0 -67
- package/lib/typescript/commonjs/ui/utils/activeAuthuser.d.ts.map +0 -1
- package/lib/typescript/commonjs/utils/crossApex.d.ts +0 -55
- package/lib/typescript/commonjs/utils/crossApex.d.ts.map +0 -1
- package/lib/typescript/module/ui/context/inSessionTokenRefresh.d.ts +0 -106
- package/lib/typescript/module/ui/context/inSessionTokenRefresh.d.ts.map +0 -1
- package/lib/typescript/module/ui/context/silentSessionRestore.d.ts +0 -36
- package/lib/typescript/module/ui/context/silentSessionRestore.d.ts.map +0 -1
- package/lib/typescript/module/ui/hooks/useWebSSO.d.ts +0 -19
- package/lib/typescript/module/ui/hooks/useWebSSO.d.ts.map +0 -1
- package/lib/typescript/module/ui/session/projectSessionState.d.ts +0 -45
- package/lib/typescript/module/ui/session/projectSessionState.d.ts.map +0 -1
- package/lib/typescript/module/ui/session/sessionClientHost.d.ts +0 -14
- package/lib/typescript/module/ui/session/sessionClientHost.d.ts.map +0 -1
- package/lib/typescript/module/ui/utils/activeAuthuser.d.ts +0 -67
- package/lib/typescript/module/ui/utils/activeAuthuser.d.ts.map +0 -1
- package/lib/typescript/module/utils/crossApex.d.ts +0 -55
- package/lib/typescript/module/utils/crossApex.d.ts.map +0 -1
- package/src/ui/context/inSessionTokenRefresh.ts +0 -264
- package/src/ui/context/silentSessionRestore.ts +0 -53
- package/src/ui/hooks/useWebSSO.ts +0 -23
- package/src/ui/session/__tests__/projectSessionState.test.ts +0 -114
- package/src/ui/session/__tests__/sessionClientHost.test.ts +0 -43
- package/src/ui/session/projectSessionState.ts +0 -85
- package/src/ui/session/sessionClientHost.ts +0 -27
- package/src/ui/utils/activeAuthuser.ts +0 -142
- package/src/utils/crossApex.ts +0 -75
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ApiError, SessionClient, User } from '@oxyhq/core';
|
|
1
|
+
import type { ApiError, AuthStateStore, SessionClient, User } from '@oxyhq/core';
|
|
2
2
|
import type { AuthState } from '../../stores/authStore.js';
|
|
3
3
|
import type { ClientSession } from '@oxyhq/core';
|
|
4
4
|
import type { StorageInterface } from '../../utils/storageHelpers.js';
|
|
@@ -6,6 +6,15 @@ import type { OxyServices } from '@oxyhq/core';
|
|
|
6
6
|
export interface UseAuthOperationsOptions {
|
|
7
7
|
oxyServices: OxyServices;
|
|
8
8
|
storage: StorageInterface | null;
|
|
9
|
+
/**
|
|
10
|
+
* The device-first persisted auth-state store. On EXPLICIT full sign-out the
|
|
11
|
+
* session blob is cleared (`store.clear()`) so a reload's cold boot finds no
|
|
12
|
+
* refresh family to restore; on sign-in a returned rotating refresh token is
|
|
13
|
+
* persisted so the next boot warm-restores without a redirect. The long-lived
|
|
14
|
+
* device token SURVIVES sign-out (the device is unchanged), so it is never
|
|
15
|
+
* cleared here.
|
|
16
|
+
*/
|
|
17
|
+
store: AuthStateStore;
|
|
9
18
|
activeSessionId: string | null;
|
|
10
19
|
setActiveSessionId: (sessionId: string | null) => void;
|
|
11
20
|
updateSessions: (sessions: ClientSession[], options?: {
|
|
@@ -13,14 +22,6 @@ export interface UseAuthOperationsOptions {
|
|
|
13
22
|
}) => void;
|
|
14
23
|
saveActiveSessionId: (sessionId: string) => Promise<void>;
|
|
15
24
|
clearSessionState: () => Promise<void>;
|
|
16
|
-
/**
|
|
17
|
-
* Clear the durable returning-user hint (`storageKeys.priorSession`). Called
|
|
18
|
-
* ONLY on EXPLICIT full sign-out — alongside `clearSsoBounceState()` — so the
|
|
19
|
-
* next cold boot treats this device as a first-time anonymous visitor (no
|
|
20
|
-
* forced `/sso` bounce). NEVER called on the passive token-expiry path, so an
|
|
21
|
-
* expired session still recovers via a returning-user bounce. Best-effort.
|
|
22
|
-
*/
|
|
23
|
-
clearPriorSessionHint: () => Promise<void>;
|
|
24
25
|
/** Used only by `performSignIn`'s same-user duplicate-session dedup (legacy session-validate path; unrelated to the SessionClient device-account set). */
|
|
25
26
|
switchSession: (sessionId: string) => Promise<User>;
|
|
26
27
|
/**
|
|
@@ -50,23 +51,17 @@ export interface UseAuthOperationsResult {
|
|
|
50
51
|
logoutAll: () => Promise<void>;
|
|
51
52
|
}
|
|
52
53
|
/**
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
* never thrown.
|
|
60
|
-
*
|
|
61
|
-
* Exported so `OxyContext`'s `syncFromClient` zero-account branch (a REMOTE
|
|
62
|
-
* full sign-out) can invoke the EXACT same cleanup as the LOCAL `logout` /
|
|
63
|
-
* `logoutAll` paths below — a remote sign-out must be indistinguishable from
|
|
64
|
-
* a local one to the next cold boot.
|
|
54
|
+
* Clear the persisted refresh-token family on an explicit full sign-out.
|
|
55
|
+
* Best-effort and non-blocking: sign-out must never fail because a storage
|
|
56
|
+
* write threw. Exported so `OxyContext`'s zero-account branch (a REMOTE full
|
|
57
|
+
* sign-out pushed over the socket) runs the EXACT same cleanup as the local
|
|
58
|
+
* `logout` / `logoutAll` paths — a remote sign-out is indistinguishable from a
|
|
59
|
+
* local one to the next cold boot.
|
|
65
60
|
*/
|
|
66
|
-
export declare function
|
|
61
|
+
export declare function clearPersistedAuthSafe(store: AuthStateStore, logger?: (message: string, error?: unknown) => void): void;
|
|
67
62
|
/**
|
|
68
63
|
* Authentication operations using public key cryptography.
|
|
69
64
|
* Accepts public key as parameter - identity management is handled by the app layer.
|
|
70
65
|
*/
|
|
71
|
-
export declare const useAuthOperations: ({ oxyServices, activeSessionId, setActiveSessionId, updateSessions, saveActiveSessionId, clearSessionState,
|
|
66
|
+
export declare const useAuthOperations: ({ oxyServices, store, activeSessionId, setActiveSessionId, updateSessions, saveActiveSessionId, clearSessionState, switchSession, sessionClient, syncFromClient, applyLanguagePreference, onAuthStateChange, onError, loginSuccess, loginFailure, logoutStore, setAuthState, logger, }: UseAuthOperationsOptions) => UseAuthOperationsResult;
|
|
72
67
|
//# 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,aAAa,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"useAuthOperations.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/context/hooks/useAuthOperations.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,aAAa,C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C,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IACnC,YAAY,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,YAAY,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,SAAS,CAAC,KAAK,IAAI,CAAC;IAClD,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;CACrD;AAED,MAAM,WAAW,uBAAuB;IACtC,uCAAuC;IACvC,MAAM,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAClE,kCAAkC;IAClC,MAAM,EAAE,CAAC,eAAe,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACpD,+BAA+B;IAC/B,SAAS,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAChC;AAMD;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,cAAc,EACrB,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO,KAAK,IAAI,GAClD,IAAI,CAIN;AAED;;;GAGG;AACH,eAAO,MAAM,iBAAiB,GAAI,wRAmB/B,wBAAwB,KAAG,uBAsR7B,CAAC"}
|
|
@@ -22,7 +22,6 @@ export declare const useUpdateProfile: () => import("@tanstack/react-query").Use
|
|
|
22
22
|
phone: import("zod").ZodOptional<import("zod").ZodString>;
|
|
23
23
|
address: import("zod").ZodOptional<import("zod").ZodString>;
|
|
24
24
|
birthday: import("zod").ZodOptional<import("zod").ZodString>;
|
|
25
|
-
location: import("zod").ZodOptional<import("zod").ZodString>;
|
|
26
25
|
locations: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodUnknown, "many">>;
|
|
27
26
|
links: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
28
27
|
linksMetadata: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
|
|
@@ -171,7 +170,6 @@ export declare const useUpdateAccountSettings: () => {
|
|
|
171
170
|
phone?: string;
|
|
172
171
|
address?: string;
|
|
173
172
|
birthday?: string;
|
|
174
|
-
location?: string;
|
|
175
173
|
website?: string;
|
|
176
174
|
createdAt?: string;
|
|
177
175
|
updatedAt?: string;
|
|
@@ -274,12 +272,12 @@ export declare const useUpdateUserPreferences: () => import("@tanstack/react-que
|
|
|
274
272
|
previousUser: User | undefined;
|
|
275
273
|
}>;
|
|
276
274
|
/**
|
|
277
|
-
* Revoke the
|
|
278
|
-
* Removes the
|
|
279
|
-
* "Connected apps" list — next sign-in
|
|
275
|
+
* Revoke the current user's grant for a connected application (by its
|
|
276
|
+
* `applicationId`). Removes the grant so the app no longer appears in the user's
|
|
277
|
+
* "Connected apps" list — next sign-in for that app will require explicit
|
|
280
278
|
* re-consent.
|
|
281
279
|
*/
|
|
282
|
-
export declare const
|
|
280
|
+
export declare const useRevokeConnectedApp: () => import("@tanstack/react-query").UseMutationResult<void, Error, string, unknown>;
|
|
283
281
|
/**
|
|
284
282
|
* Upload file with authentication handling and progress tracking
|
|
285
283
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAccountMutations.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/hooks/mutations/useAccountMutations.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,gBAAgB,EAChB,uBAAuB,EACvB,eAAe,EACf,IAAI,EACJ,eAAe,EAChB,MAAM,aAAa,CAAC;AAerB;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;;;
|
|
1
|
+
{"version":3,"file":"useAccountMutations.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/hooks/mutations/useAccountMutations.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,gBAAgB,EAChB,uBAAuB,EACv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AAO,CAAC;iBACrB,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI;WAS5C,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ConnectedApp, User } from '@oxyhq/core';
|
|
2
2
|
/**
|
|
3
3
|
* Get user profile by session ID
|
|
4
4
|
*/
|
|
@@ -49,14 +49,13 @@ export declare const useUsersBySessions: (sessionIds: string[], options?: {
|
|
|
49
49
|
user: User | null;
|
|
50
50
|
}[]>, Error>;
|
|
51
51
|
/**
|
|
52
|
-
* List the
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
* RP catalog. Drives the "Connected apps" management screen.
|
|
52
|
+
* List the third-party OAuth applications the current user has connected via
|
|
53
|
+
* the consent flow (`GET /auth/grants`). Drives the "Connected apps" management
|
|
54
|
+
* screen.
|
|
56
55
|
*/
|
|
57
|
-
export declare const
|
|
56
|
+
export declare const useConnectedApps: (options?: {
|
|
58
57
|
enabled?: boolean;
|
|
59
|
-
}) => import("@tanstack/react-query").UseQueryResult<NoInfer<
|
|
58
|
+
}) => import("@tanstack/react-query").UseQueryResult<NoInfer<ConnectedApp[]>, Error>;
|
|
60
59
|
/**
|
|
61
60
|
* Get privacy settings for a user
|
|
62
61
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAccountQueries.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/hooks/queries/useAccountQueries.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"useAccountQueries.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/hooks/queries/useAccountQueries.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAMtD;;GAEG;AACH,eAAO,MAAM,cAAc,GAAI,WAAW,MAAM,GAAG,IAAI,EAAE,UAAU;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,yEAevF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,GAAI,YAAY,MAAM,EAAE,EAAE,UAAU;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,yEAepF,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,cAAc,GAAI,UAAU;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,yEA8D7D,CAAC;AAsBF;;GAEG;AACH,eAAO,MAAM,WAAW,GAAI,QAAQ,MAAM,GAAG,IAAI,EAAE,UAAU;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,yEAejF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iBAAiB,GAAI,UAAU,MAAM,GAAG,IAAI,EAAE,UAAU;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,yEAezF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kBAAkB,GAAI,YAAY,MAAM,EAAE,EAAE,UAAU;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE;;;YAevF,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,GAAI,UAAU;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,mFAgB/D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kBAAkB,GAAI,SAAS,MAAM,EAAE,UAAU;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,0GAwBlF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAuth.d.ts","sourceRoot":"","sources":["../../../../../src/ui/hooks/useAuth.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAGH,OAAO,EAAE,MAAM,EAAE,MAAM,0BAAuB,CAAC;AAC/C,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"useAuth.d.ts","sourceRoot":"","sources":["../../../../../src/ui/hooks/useAu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,EAAE,UAAU,CAAC,OAAO,MAAM,CAAC,CAAC,kBAAkB,CAAC,CAAC;CACjE;AAED;;;;;;;;GAQG;AACH,wBAAgB,OAAO,IAAI,aAAa,CA8FvC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export type PasswordSignInStep = 'identifier' | 'password' | 'twoFactor';
|
|
2
|
+
export interface UsePasswordSignInOptions {
|
|
3
|
+
/** Fired once a session has been committed (the surface should close). */
|
|
4
|
+
onSignedIn?: () => void;
|
|
5
|
+
}
|
|
6
|
+
export interface UsePasswordSignInResult {
|
|
7
|
+
step: PasswordSignInStep;
|
|
8
|
+
identifier: string;
|
|
9
|
+
setIdentifier: (value: string) => void;
|
|
10
|
+
password: string;
|
|
11
|
+
setPassword: (value: string) => void;
|
|
12
|
+
/** The current 2FA input — a TOTP code or a backup code, per `useBackupCode`. */
|
|
13
|
+
code: string;
|
|
14
|
+
setCode: (value: string) => void;
|
|
15
|
+
useBackupCode: boolean;
|
|
16
|
+
setUseBackupCode: (value: boolean) => void;
|
|
17
|
+
error: string | null;
|
|
18
|
+
isSubmitting: boolean;
|
|
19
|
+
/** Advance identifier → password (validates a non-empty identifier). */
|
|
20
|
+
submitIdentifier: () => void;
|
|
21
|
+
/** Submit the password: commits a one-step session, or advances to 2FA. */
|
|
22
|
+
submitPassword: () => Promise<void>;
|
|
23
|
+
/** Submit the 2FA code / backup code and commit the session. */
|
|
24
|
+
submitTwoFactor: () => Promise<void>;
|
|
25
|
+
/** Step back one screen (2FA → password → identifier), clearing the error. */
|
|
26
|
+
back: () => void;
|
|
27
|
+
/** Reset every field back to the identifier step. */
|
|
28
|
+
reset: () => void;
|
|
29
|
+
}
|
|
30
|
+
export declare function usePasswordSignIn(options?: UsePasswordSignInOptions): UsePasswordSignInResult;
|
|
31
|
+
//# sourceMappingURL=usePasswordSignIn.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePasswordSignIn.d.ts","sourceRoot":"","sources":["../../../../../src/ui/hooks/usePasswordSignIn.ts"],"names":[],"mappings":"AAkBA,MAAM,MAAM,kBAAkB,GAAG,YAAY,GAAG,UAAU,GAAG,WAAW,CAAC;AAEzE,MAAM,WAAW,wBAAwB;IACvC,0EAA0E;IAC1E,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;CACzB;AAED,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,kBAAkB,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,iFAAiF;IACjF,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,aAAa,EAAE,OAAO,CAAC;IACvB,gBAAgB,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAC3C,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,YAAY,EAAE,OAAO,CAAC;IACtB,wEAAwE;IACxE,gBAAgB,EAAE,MAAM,IAAI,CAAC;IAC7B,2EAA2E;IAC3E,cAAc,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACpC,gEAAgE;IAChE,eAAe,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACrC,8EAA8E;IAC9E,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,qDAAqD;IACrD,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB;AAED,wBAAgB,iBAAiB,CAAC,OAAO,GAAE,wBAA6B,GAAG,uBAAuB,CA4JjG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useProfileEditing.d.ts","sourceRoot":"","sources":["../../../../../src/ui/hooks/useProfileEditing.ts"],"names":[],"mappings":"AAKA,UAAU,eAAe;IAC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,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,eAAe,EAAE,CAAC;IAC9B,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,aAAa,CAAC,EAAE,mBAAmB,EAAE,CAAC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,KAAK,iBAAiB,GAAG,MAAM,GAAG,eAAe,EAAE,GAAG,mBAAmB,EAAE,CAAC;AAU5E;;;GAGG;AACH,eAAO,MAAM,iBAAiB;2BAMsB,iBAAiB;yBAyDnB,MAAM,SAAS,iBAAiB;;CAqDjF,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ComponentType, ReactNode } from 'react';
|
|
2
2
|
import type { BaseScreenProps } from '../types/navigation.js';
|
|
3
|
-
export type RouteName = 'OxyAuth' | 'ManageAccount' | 'AccountVerification' | 'PaymentGateway' | 'Profile' | 'LanguageSelector' | 'PrivacySettings' | 'SearchSettings' | 'FileManagement' | 'HelpSupport' | 'FAQ' | 'Feedback' | 'LegalDocuments' | 'AppInfo' | 'PremiumSubscription' | 'WelcomeNewUser' | 'UserLinks' | 'HistoryView' | 'SavesCollections' | 'EditProfileField' | 'LearnMoreUsernames' | 'TrustCenter' | 'TrustLeaderboard' | 'TrustRewards' | 'TrustRules' | 'AboutTrust' | 'TrustFAQ' | 'FollowersList' | 'FollowingList' | 'AccountSwitcher' | 'CreateAccount' | 'AccountMembers' | 'AccountSettings' | 'AvatarCrop' | 'Notifications' | 'ConnectedApps' | 'Preferences';
|
|
3
|
+
export type RouteName = 'OxyAuth' | 'ManageAccount' | 'AccountVerification' | 'PaymentGateway' | 'Profile' | 'LanguageSelector' | 'PrivacySettings' | 'SearchSettings' | 'FileManagement' | 'HelpSupport' | 'FAQ' | 'Feedback' | 'LegalDocuments' | 'AppInfo' | 'PremiumSubscription' | 'WelcomeNewUser' | 'UserLinks' | 'HistoryView' | 'SavesCollections' | 'EditProfile' | 'EditProfileField' | 'LearnMoreUsernames' | 'TrustCenter' | 'TrustLeaderboard' | 'TrustRewards' | 'TrustRules' | 'AboutTrust' | 'TrustFAQ' | 'FollowersList' | 'FollowingList' | 'AccountSwitcher' | 'CreateAccount' | 'AccountMembers' | 'AccountSettings' | 'AvatarCrop' | 'Notifications' | 'ConnectedApps' | 'Preferences';
|
|
4
4
|
export declare const getScreenComponent: (routeName: RouteName) => ComponentType<BaseScreenProps> | undefined;
|
|
5
5
|
export declare const isValidRoute: (routeName: string) => routeName is RouteName;
|
|
6
6
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../../../src/ui/navigation/routes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAqB,CAAC;AAO3D,MAAM,MAAM,SAAS,GACf,SAAS,GACT,eAAe,GACf,qBAAqB,GACrB,gBAAgB,GAChB,SAAS,GACT,kBAAkB,GAClB,iBAAiB,GACjB,gBAAgB,GAChB,gBAAgB,GAChB,aAAa,GACb,KAAK,GACL,UAAU,GACV,gBAAgB,GAChB,SAAS,GACT,qBAAqB,GACrB,gBAAgB,GAChB,WAAW,GACX,aAAa,GACb,kBAAkB,GAClB,kBAAkB,GAClB,oBAAoB,GACpB,aAAa,GACb,kBAAkB,GAClB,cAAc,GACd,YAAY,GACZ,YAAY,GACZ,UAAU,GACV,eAAe,GACf,eAAe,GACf,iBAAiB,GACjB,eAAe,GACf,gBAAgB,GAChB,iBAAiB,GACjB,YAAY,GACZ,eAAe,GACf,eAAe,GACf,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../../../src/ui/navigation/routes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAqB,CAAC;AAO3D,MAAM,MAAM,SAAS,GACf,SAAS,GACT,eAAe,GACf,qBAAqB,GACrB,gBAAgB,GAChB,SAAS,GACT,kBAAkB,GAClB,iBAAiB,GACjB,gBAAgB,GAChB,gBAAgB,GAChB,aAAa,GACb,KAAK,GACL,UAAU,GACV,gBAAgB,GAChB,SAAS,GACT,qBAAqB,GACrB,gBAAgB,GAChB,WAAW,GACX,aAAa,GACb,kBAAkB,GAClB,aAAa,GACb,kBAAkB,GAClB,oBAAoB,GACpB,aAAa,GACb,kBAAkB,GAClB,cAAc,GACd,YAAY,GACZ,YAAY,GACZ,UAAU,GACV,eAAe,GACf,eAAe,GACf,iBAAiB,GACjB,eAAe,GACf,gBAAgB,GAChB,iBAAiB,GACjB,YAAY,GACZ,eAAe,GACf,eAAe,GACf,aAAa,CAAC;AAoDpB,eAAO,MAAM,kBAAkB,GAAI,WAAW,SAAS,KAAG,aAAa,CAAC,eAAe,CAAC,GAAG,SAsB1F,CAAC;AAIF,eAAO,MAAM,YAAY,GAAI,WAAW,MAAM,KAAG,SAAS,IAAI,SAE7D,CAAC;AAEF;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAC7B;;;;;OAKG;IACH,UAAU,EAAE,OAAO,CAAC;IACpB;;;;;;;;;;OAUG;IACH,gBAAgB,EAAE,OAAO,CAAC;IAC1B;;;;OAIG;IACH,eAAe,EAAE,OAAO,CAAC;IACzB;;;;;;OAMG;IACH,eAAe,CAAC,EAAE,MAAM,SAAS,CAAC;CACrC;AA+BD;;;;GAIG;AACH,eAAO,MAAM,cAAc,GACvB,WAAW,SAAS,GAAG,IAAI,EAC3B,aAAa,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KACrC,gBASF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConnectedAppsScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/ConnectedAppsScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAOrD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAqB,CAAC;;
|
|
1
|
+
{"version":3,"file":"ConnectedAppsScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/ConnectedAppsScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAOrD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAqB,CAAC;;AAsM3D,wBAA+C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditProfileFieldScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/EditProfileFieldScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"EditProfileFieldScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/EditProfileFieldScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyC,MAAM,OAAO,CAAC;AAY9D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAqB,CAAC;AAe3D;;GAEG;AACH,MAAM,MAAM,gBAAgB,GACtB,aAAa,GACb,UAAU,GACV,OAAO,GACP,KAAK,GACL,OAAO,GACP,SAAS,GACT,UAAU,GACV,UAAU,GACV,WAAW,GACX,OAAO,CAAC;AAmBd,UAAU,2BAA4B,SAAQ,eAAe;IACzD,6BAA6B;IAC7B,SAAS,CAAC,EAAE,gBAAgB,CAAC;CAChC;;AAmjBD,wBAAkD"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { BaseScreenProps } from '../types/navigation.js';
|
|
3
|
+
/**
|
|
4
|
+
* EditProfileScreen — the profile-editing HUB.
|
|
5
|
+
*
|
|
6
|
+
* Lists every editable profile field as its own row; each row deep-links into
|
|
7
|
+
* {@link EditProfileFieldScreen} with the matching `fieldType`. The avatar row
|
|
8
|
+
* reuses the exact same `openAvatarPicker` entry point that
|
|
9
|
+
* {@link ManageAccountScreen} uses. This is the single entry into per-field
|
|
10
|
+
* editing — reached from ManageAccount's "Edit profile" row.
|
|
11
|
+
*/
|
|
12
|
+
declare const EditProfileScreen: React.FC<BaseScreenProps>;
|
|
13
|
+
export default EditProfileScreen;
|
|
14
|
+
//# sourceMappingURL=EditProfileScreen.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EditProfileScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/EditProfileScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAqB,CAAC;AAQ3D;;;;;;;;GAQG;AACH,QAAA,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAgIhD,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -6,7 +6,7 @@ import type { BaseScreenProps } from '../types/navigation.js';
|
|
|
6
6
|
* Replaces AccountOverview + AccountSettings + the per-account half of
|
|
7
7
|
* SessionManagement. Lists ONLY the active user's profile, sessions on this
|
|
8
8
|
* device, and security/destructive actions for THIS account. Multi-account
|
|
9
|
-
* surface lives in {@link
|
|
9
|
+
* surface lives in {@link AccountSwitcher} — keep these concerns separate.
|
|
10
10
|
*/
|
|
11
11
|
declare const ManageAccountScreen: React.FC<BaseScreenProps>;
|
|
12
12
|
export default ManageAccountScreen;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ManageAccountScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/ManageAccountScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAsB/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAqB,CAAC;AAoD3D;;;;;;;GAOG;AACH,QAAA,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,
|
|
1
|
+
{"version":3,"file":"ManageAccountScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/ManageAccountScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAsB/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAqB,CAAC;AAoD3D;;;;;;;GAOG;AACH,QAAA,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CA25BlD,CAAC;AA+BF,eAAe,mBAAmB,CAAC"}
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* OxyAuthScreen
|
|
2
|
+
* OxyAuthScreen — Sign in with Oxy (native bottom-sheet container).
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
4
|
+
* Two phases, Google-style:
|
|
5
|
+
* 1. Account chooser (FRONT screen, shown when the device/user already has
|
|
6
|
+
* accounts): pick an account to continue as — one tap switches through the
|
|
7
|
+
* SAME `switchToAccount` path the account switcher uses — or "Use another
|
|
8
|
+
* account" to reveal the sign-in options.
|
|
9
|
+
* 2. Sign-in options: the first-party password flow (identifier → password →
|
|
10
|
+
* optional 2FA, `usePasswordSignIn`) as the PRIMARY action, with the
|
|
11
|
+
* cross-app device flow (same-device deep-link + "sign in on another device"
|
|
12
|
+
* QR) as a SECONDARY option below an "or" divider.
|
|
9
13
|
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* which the web `SignInModal` also consumes — neither container re-implements
|
|
14
|
-
* the transport. The Oxy Accounts app is where users manage their cryptographic
|
|
15
|
-
* identity; this screen should NOT be used within the Accounts app itself.
|
|
14
|
+
* The device-flow machinery lives in the shared `useOxyAuthSession` hook (the
|
|
15
|
+
* web `SignInModal` consumes it too). This screen should NOT be used within the
|
|
16
|
+
* Oxy Accounts app itself.
|
|
16
17
|
*/
|
|
17
18
|
import type React from 'react';
|
|
18
19
|
import type { BaseScreenProps } from '../types/navigation.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OxyAuthScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/OxyAuthScreen.tsx"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"OxyAuthScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/OxyAuthScreen.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAqB,CAAC;AAmB3D,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAyR5C,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProfileScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/ProfileScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAqB,CAAC;AAe3D,UAAU,kBAAmB,SAAQ,eAAe;IAChD,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAOD,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,
|
|
1
|
+
{"version":3,"file":"ProfileScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/ProfileScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAqB,CAAC;AAe3D,UAAU,kBAAmB,SAAQ,eAAe;IAChD,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAOD,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CA+S/C,CAAC;AA0CF,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure link-display helpers for the profile "links" editor. Kept out of the
|
|
3
|
+
* screen component so the string-coercion guard can be unit-tested without
|
|
4
|
+
* rendering the whole React Native screen.
|
|
5
|
+
*/
|
|
6
|
+
/** Strip the protocol and any trailing slash from a link URL for display. */
|
|
7
|
+
export declare const getLinkTitle: (url: string) => string;
|
|
8
|
+
/** Human-readable description for a link URL. */
|
|
9
|
+
export declare const getLinkDescription: (url: string) => string;
|
|
10
|
+
export interface LinkListItem {
|
|
11
|
+
id: string;
|
|
12
|
+
url: string;
|
|
13
|
+
title: string;
|
|
14
|
+
description: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Build editable list items from a raw links array. The array can come from
|
|
18
|
+
* legacy or untrusted profile data whose elements are not guaranteed to be
|
|
19
|
+
* strings, so each entry is coerced with `String(item ?? '')` before formatting
|
|
20
|
+
* — a non-string element must never crash the editor.
|
|
21
|
+
*/
|
|
22
|
+
export declare function linksToListItems(links: readonly unknown[]): LinkListItem[];
|
|
23
|
+
//# sourceMappingURL=linkFormat.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"linkFormat.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/linkFormat.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,6EAA6E;AAC7E,eAAO,MAAM,YAAY,GAAI,KAAK,MAAM,KAAG,MACW,CAAC;AAEvD,iDAAiD;AACjD,eAAO,MAAM,kBAAkB,GAAI,KAAK,MAAM,KAAG,MAA0B,CAAC;AAE5E,MAAM,WAAW,YAAY;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;CACvB;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,SAAS,OAAO,EAAE,GAAG,YAAY,EAAE,CAU1E"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Platform `AuthStateStore` for `@oxyhq/services`.
|
|
3
|
+
*
|
|
4
|
+
* The device-first session model persists the rotating refresh-token family
|
|
5
|
+
* head per origin (web) / per device (native). `@oxyhq/core` owns the store
|
|
6
|
+
* shape + logic (`createWebAuthStateStore` / `createNativeAuthStateStore`); this
|
|
7
|
+
* module only supplies the platform storage seam and wires the native device
|
|
8
|
+
* token to the SHARED keychain so every native Oxy app joins one DeviceSession:
|
|
9
|
+
*
|
|
10
|
+
* - web → `createWebAuthStateStore()` (localStorage, in-memory fallback).
|
|
11
|
+
* - native → `createNativeAuthStateStore(secureKV)` for the SESSION blob
|
|
12
|
+
* (refresh token) over `expo-secure-store` (AsyncStorage fallback), with the
|
|
13
|
+
* long-lived DEVICE token delegated to `KeyManager`'s shared keychain
|
|
14
|
+
* (`group.so.oxy.shared`) instead of per-app storage — so an in-app login on
|
|
15
|
+
* any native Oxy app attributes to the SAME server-side DeviceSession.
|
|
16
|
+
*
|
|
17
|
+
* `expo-secure-store` is loaded via a runtime-computed dynamic import (the same
|
|
18
|
+
* optional-native-module pattern `OxyProvider` uses for netinfo / keyboard
|
|
19
|
+
* controller), so the web bundle never pulls it and a device without it falls
|
|
20
|
+
* back to AsyncStorage rather than crashing.
|
|
21
|
+
*/
|
|
22
|
+
import { type AuthStateStore } from '@oxyhq/core';
|
|
23
|
+
/**
|
|
24
|
+
* Build the platform {@link AuthStateStore} for this runtime.
|
|
25
|
+
*
|
|
26
|
+
* Native additionally routes the device token through the shared keychain so
|
|
27
|
+
* every native Oxy app shares one server-side DeviceSession; the session blob
|
|
28
|
+
* (refresh token) stays per-app in SecureStore. Best-effort keychain access —
|
|
29
|
+
* a locked/failed shared-keychain read degrades to "no device token" rather
|
|
30
|
+
* than throwing out of cold boot / refresh.
|
|
31
|
+
*/
|
|
32
|
+
export declare function createPlatformAuthStateStore(): AuthStateStore;
|
|
33
|
+
//# sourceMappingURL=authStore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authStore.d.ts","sourceRoot":"","sources":["../../../../../src/ui/session/authStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,OAAO,EAIL,KAAK,cAAc,EAGpB,MAAM,aAAa,CAAC;AAmFrB;;;;;;;;GAQG;AACH,wBAAgB,4BAA4B,IAAI,cAAc,CA2C7D"}
|
|
@@ -1,21 +1,25 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import { SessionClient } from '@oxyhq/core';
|
|
3
|
-
import { createSessionClientHost } from './sessionClientHost.js';
|
|
1
|
+
import { SessionClient, createSessionClientHost, type AuthStateStore, type OxyServices } from '@oxyhq/core';
|
|
4
2
|
/**
|
|
5
|
-
*
|
|
6
|
-
* adapter (Task 1) and the platform `TokenTransport` (Task 3) over the given
|
|
7
|
-
* `OxyServices` instance, and returns both the client and the host — the host
|
|
8
|
-
* is returned (not just the client) so `OxyContext` (Fase 3-B) can call
|
|
9
|
-
* `host.setCurrentAccountId(...)` as the active account changes.
|
|
3
|
+
* Wire a `SessionClient` for `@oxyhq/services`.
|
|
10
4
|
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
5
|
+
* The platform-agnostic parts (host adapter, client, projection helpers) live
|
|
6
|
+
* ONCE in `@oxyhq/core`; this thin factory only injects the pieces specific to
|
|
7
|
+
* the RN/Expo SDK:
|
|
8
|
+
*
|
|
9
|
+
* - `socket.io-client`'s `io`, STATICALLY imported (socket.io-client is a real
|
|
10
|
+
* dependency of `@oxyhq/services`) so realtime session sync never relies on
|
|
11
|
+
* core's lazy dynamic import of a bare specifier — bundler-fragile in
|
|
12
|
+
* Metro/Expo-web against the published core dist.
|
|
13
|
+
* - the device-first {@link createTokenTransport}, which mints a fallback token
|
|
14
|
+
* by rotating the persisted refresh family (`store`).
|
|
15
|
+
*
|
|
16
|
+
* `onUnauthenticated` fires when an applied device state has zero accounts (a
|
|
17
|
+
* device signout-all): the provider clears the persisted store + local state so
|
|
18
|
+
* a reload does not try to restore a dead session. The host is returned
|
|
19
|
+
* alongside the client so the caller can call `host.setCurrentAccountId(...)`
|
|
20
|
+
* as the active account changes.
|
|
17
21
|
*/
|
|
18
|
-
export declare function createSessionClient(oxyServices: OxyServices): {
|
|
22
|
+
export declare function createSessionClient(oxyServices: OxyServices, store: AuthStateStore, onUnauthenticated?: () => void): {
|
|
19
23
|
client: SessionClient;
|
|
20
24
|
host: ReturnType<typeof createSessionClientHost>;
|
|
21
25
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createSessionClient.d.ts","sourceRoot":"","sources":["../../../../../src/ui/session/createSessionClient.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"createSessionClient.d.ts","sourceRoot":"","sources":["../../../../../src/ui/session/createSessionClient.ts"],"names":[],"mappings":"AACA,OAAO,EACL,aAAa,EACb,uBAAuB,EACvB,KAAK,cAAc,EACnB,KAAK,WAAW,EACjB,MAAM,aAAa,CAAC;AAGrB;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,mBAAmB,CACjC,WAAW,EAAE,WAAW,EACxB,KAAK,EAAE,cAAc,EACrB,iBAAiB,CAAC,EAAE,MAAM,IAAI,GAC7B;IACD,MAAM,EAAE,aAAa,CAAC;IACtB,IAAI,EAAE,UAAU,CAAC,OAAO,uBAAuB,CAAC,CAAC;CAClD,CAKA"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Session-sync integration layer
|
|
2
|
+
* Session-sync integration layer — intra-package use only.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
4
|
+
* `@oxyhq/core` owns the platform-agnostic `SessionClient`, its host adapter,
|
|
5
|
+
* and the pure `DeviceSessionState → services` projection helpers; those are
|
|
6
|
+
* re-exported straight from core here so `OxyContext` has one import site.
|
|
7
|
+
* `@oxyhq/services` supplies only the two platform pieces: the thin
|
|
8
|
+
* `createSessionClient` factory (injects socket.io-client `io` + the
|
|
9
|
+
* device-first token transport) and the `AuthStateStore` factory.
|
|
10
10
|
*/
|
|
11
11
|
export { createSessionClient } from './createSessionClient.js';
|
|
12
|
-
export { createSessionClientHost } from './sessionClientHost.js';
|
|
13
12
|
export { createTokenTransport } from './tokenTransport.js';
|
|
14
|
-
export {
|
|
13
|
+
export { createPlatformAuthStateStore } from './authStore.js';
|
|
14
|
+
export { createSessionClientHost, accountIdsOf, activeSessionIdOf, activeUserOf, deviceStateToClientSessions, } from '@oxyhq/core';
|
|
15
15
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/ui/session/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAAuB,CAAC;AAC5D,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/ui/session/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAAuB,CAAC;AAC5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAkB,CAAC;AACxD,OAAO,EAAE,4BAA4B,EAAE,MAAM,gBAAa,CAAC;AAC3D,OAAO,EACL,uBAAuB,EACvB,YAAY,EACZ,iBAAiB,EACjB,YAAY,EACZ,2BAA2B,GAC5B,MAAM,aAAa,CAAC"}
|
|
@@ -1,24 +1,18 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type AuthStateStore, type OxyServices, type TokenTransport } from '@oxyhq/core';
|
|
2
2
|
/**
|
|
3
|
-
* Platform `TokenTransport` for `SessionClient
|
|
4
|
-
* none is currently held, reusing the SAME primitives `OxyContext`'s cold
|
|
5
|
-
* boot already relies on (never re-implemented here):
|
|
3
|
+
* Platform `TokenTransport` for `SessionClient` (device-first model).
|
|
6
4
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
5
|
+
* `ensureActiveToken` is the fallback the client uses when a `session_state`
|
|
6
|
+
* push arrived WITHOUT an embedded `activeToken` and the app currently holds no
|
|
7
|
+
* bearer. It mints one through the ONE unified refresh path
|
|
8
|
+
* (`refreshPersistedSession`): rotate the persisted refresh-token family
|
|
9
|
+
* (`POST /auth/refresh-token`) and, on native, fall back to the shared-keychain
|
|
10
|
+
* re-mint. There is no FedCM/silent-iframe arm anymore — the per-origin
|
|
11
|
+
* persisted refresh token is the durable web credential.
|
|
9
12
|
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* `ensureActiveToken` treats a PRESENT token as sufficient in this phase; it
|
|
14
|
-
* does not decode/match the token's subject against `state.activeAccountId`
|
|
15
|
-
* (that refinement is Fase 3-B). Account switching itself is server-driven
|
|
16
|
-
* via the `activeToken` carried in the sync envelope — this transport is
|
|
17
|
-
* only the fallback used when the envelope carried no token.
|
|
18
|
-
*
|
|
19
|
-
* A failed mint is logged and swallowed: it must never throw out of
|
|
20
|
-
* `ensureActiveToken`, since that would crash the caller (the SessionClient
|
|
21
|
-
* socket handler in Fase 3-B).
|
|
13
|
+
* Concurrent pushes coalesce onto one in-flight mint. A failure is logged and
|
|
14
|
+
* swallowed: this method must never throw out (it runs inside the socket state
|
|
15
|
+
* handler).
|
|
22
16
|
*/
|
|
23
|
-
export declare function createTokenTransport(oxyServices: OxyServices): TokenTransport;
|
|
17
|
+
export declare function createTokenTransport(oxyServices: OxyServices, store: AuthStateStore): TokenTransport;
|
|
24
18
|
//# sourceMappingURL=tokenTransport.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokenTransport.d.ts","sourceRoot":"","sources":["../../../../../src/ui/session/tokenTransport.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tokenTransport.d.ts","sourceRoot":"","sources":["../../../../../src/ui/session/tokenTransport.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,cAAc,EACnB,KAAK,WAAW,EAChB,KAAK,cAAc,EACpB,MAAM,aAAa,CAAC;AAGrB;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,oBAAoB,CAClC,WAAW,EAAE,WAAW,EACxB,KAAK,EAAE,cAAc,GACpB,cAAc,CAsChB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Web-browser detection for `@oxyhq/services`.
|
|
3
|
+
*
|
|
4
|
+
* The predicate now lives ONCE in `@oxyhq/core` (`isWebBrowser`) so services and
|
|
5
|
+
* auth-sdk share the exact same DOM probe. This module re-exposes it under the
|
|
6
|
+
* existing internal import path so consumers stay unchanged.
|
|
7
|
+
*/
|
|
8
|
+
export { isWebBrowser } from '@oxyhq/core';
|
|
9
|
+
//# sourceMappingURL=isWebBrowser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isWebBrowser.d.ts","sourceRoot":"","sources":["../../../../../src/ui/utils/isWebBrowser.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -10,13 +10,13 @@ export interface SessionStorageKeys {
|
|
|
10
10
|
language: string;
|
|
11
11
|
/**
|
|
12
12
|
* DURABLE "this device/app has had a signed-in Oxy session before" hint.
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
13
|
+
* Originally read at cold boot to drive the FedCM-era smart `sso-bounce`
|
|
14
|
+
* gate (a returning visitor still got one establish bounce; a first-time
|
|
15
|
+
* anonymous visitor was never force-redirected). That gate and
|
|
16
|
+
* `allowSsoBounce` were deleted in the device-first cutover — this storage
|
|
17
|
+
* key is currently defined but not read anywhere; kept rather than removed
|
|
18
|
+
* here since deleting a storage key is a logic change, out of scope for a
|
|
19
|
+
* comment sweep. Flag for a follow-up dead-field cleanup.
|
|
20
20
|
*/
|
|
21
21
|
priorSession: string;
|
|
22
22
|
}
|