@oxy.so/services 14.10.1 → 14.12.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/assets/assets/fonts/icons/OxyServicesIonicons.ttf +0 -0
- package/lib/commonjs/assets/assets/fonts/icons/OxyServicesMaterialCommunityIcons.ttf +0 -0
- package/lib/commonjs/assets/assets/fonts/icons/manifest.json +5 -4
- package/lib/commonjs/assets/fonts/icons/OxyServicesIonicons.ttf +0 -0
- package/lib/commonjs/assets/fonts/icons/OxyServicesMaterialCommunityIcons.ttf +0 -0
- package/lib/commonjs/assets/fonts/icons/manifest.json +5 -4
- package/lib/commonjs/index.js +10 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/ui/boot/runProviderColdBoot.js +3 -1
- package/lib/commonjs/ui/boot/runProviderColdBoot.js.map +1 -1
- package/lib/commonjs/ui/components/OxyProvider.js +52 -18
- package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
- package/lib/commonjs/ui/context/OxyContext.js +15 -5
- package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
- package/lib/commonjs/ui/context/OxyHostedContext.js +515 -0
- package/lib/commonjs/ui/context/OxyHostedContext.js.map +1 -0
- package/lib/commonjs/ui/context/oxyRuntimeContext.js.map +1 -1
- package/lib/commonjs/ui/hooks/useAuth.js +13 -2
- package/lib/commonjs/ui/hooks/useAuth.js.map +1 -1
- package/lib/commonjs/ui/hooks/useOxyEvent.js +9 -5
- package/lib/commonjs/ui/hooks/useOxyEvent.js.map +1 -1
- package/lib/commonjs/ui/icons/subsetGlyphMaps.js +1 -0
- package/lib/commonjs/ui/icons/subsetGlyphMaps.js.map +1 -1
- package/lib/commonjs/ui/screens/EditProfileFieldScreen.js +16 -63
- package/lib/commonjs/ui/screens/EditProfileFieldScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ProfileLinkForm.js +125 -0
- package/lib/commonjs/ui/screens/ProfileLinkForm.js.map +1 -0
- package/lib/commonjs/ui/screens/ProfileLinksEditor.js +85 -0
- package/lib/commonjs/ui/screens/ProfileLinksEditor.js.map +1 -0
- package/lib/commonjs/ui/screens/linkFormat.js +22 -10
- package/lib/commonjs/ui/screens/linkFormat.js.map +1 -1
- package/lib/commonjs/ui/session/hostSession.js +474 -0
- package/lib/commonjs/ui/session/hostSession.js.map +1 -0
- package/lib/module/assets/assets/fonts/icons/OxyServicesIonicons.ttf +0 -0
- package/lib/module/assets/assets/fonts/icons/OxyServicesMaterialCommunityIcons.ttf +0 -0
- package/lib/module/assets/assets/fonts/icons/manifest.json +5 -4
- package/lib/module/assets/fonts/icons/OxyServicesIonicons.ttf +0 -0
- package/lib/module/assets/fonts/icons/OxyServicesMaterialCommunityIcons.ttf +0 -0
- package/lib/module/assets/fonts/icons/manifest.json +5 -4
- package/lib/module/index.js +3 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/ui/boot/runProviderColdBoot.js +3 -1
- package/lib/module/ui/boot/runProviderColdBoot.js.map +1 -1
- package/lib/module/ui/components/OxyProvider.js +53 -19
- package/lib/module/ui/components/OxyProvider.js.map +1 -1
- package/lib/module/ui/context/OxyContext.js +15 -5
- package/lib/module/ui/context/OxyContext.js.map +1 -1
- package/lib/module/ui/context/OxyHostedContext.js +510 -0
- package/lib/module/ui/context/OxyHostedContext.js.map +1 -0
- package/lib/module/ui/context/oxyRuntimeContext.js.map +1 -1
- package/lib/module/ui/hooks/useAuth.js +13 -2
- package/lib/module/ui/hooks/useAuth.js.map +1 -1
- package/lib/module/ui/hooks/useOxyEvent.js +9 -5
- package/lib/module/ui/hooks/useOxyEvent.js.map +1 -1
- package/lib/module/ui/icons/subsetGlyphMaps.js +1 -0
- package/lib/module/ui/icons/subsetGlyphMaps.js.map +1 -1
- package/lib/module/ui/screens/EditProfileFieldScreen.js +17 -65
- package/lib/module/ui/screens/EditProfileFieldScreen.js.map +1 -1
- package/lib/module/ui/screens/ProfileLinkForm.js +121 -0
- package/lib/module/ui/screens/ProfileLinkForm.js.map +1 -0
- package/lib/module/ui/screens/ProfileLinksEditor.js +81 -0
- package/lib/module/ui/screens/ProfileLinksEditor.js.map +1 -0
- package/lib/module/ui/screens/linkFormat.js +21 -9
- package/lib/module/ui/screens/linkFormat.js.map +1 -1
- package/lib/module/ui/session/hostSession.js +467 -0
- package/lib/module/ui/session/hostSession.js.map +1 -0
- package/lib/typescript/commonjs/index.d.ts +1 -0
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/boot/runProviderColdBoot.d.ts +6 -0
- package/lib/typescript/commonjs/ui/boot/runProviderColdBoot.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/OxyHostedContext.d.ts +40 -0
- package/lib/typescript/commonjs/ui/context/OxyHostedContext.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/context/oxyContextTypes.d.ts +19 -2
- package/lib/typescript/commonjs/ui/context/oxyContextTypes.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/oxyRuntimeContext.d.ts +6 -0
- package/lib/typescript/commonjs/ui/context/oxyRuntimeContext.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useAuth.d.ts +3 -0
- package/lib/typescript/commonjs/ui/hooks/useAuth.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useOxyEvent.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/icons/Ionicons.d.ts +1 -1
- package/lib/typescript/commonjs/ui/icons/Ionicons.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/icons/subsetGlyphMaps.d.ts +1 -0
- package/lib/typescript/commonjs/ui/icons/subsetGlyphMaps.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/EditProfileFieldScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/ProfileLinkForm.d.ts +18 -0
- package/lib/typescript/commonjs/ui/screens/ProfileLinkForm.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/screens/ProfileLinksEditor.d.ts +14 -0
- package/lib/typescript/commonjs/ui/screens/ProfileLinksEditor.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/screens/linkFormat.d.ts +14 -2
- package/lib/typescript/commonjs/ui/screens/linkFormat.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/session/hostSession.d.ts +69 -0
- package/lib/typescript/commonjs/ui/session/hostSession.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/types/navigation.d.ts +24 -1
- package/lib/typescript/commonjs/ui/types/navigation.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/utils/identityCrypto.d.ts +4 -0
- package/lib/typescript/commonjs/ui/utils/identityCrypto.d.ts.map +1 -1
- package/lib/typescript/module/index.d.ts +1 -0
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/lib/typescript/module/ui/boot/runProviderColdBoot.d.ts +6 -0
- package/lib/typescript/module/ui/boot/runProviderColdBoot.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/OxyHostedContext.d.ts +40 -0
- package/lib/typescript/module/ui/context/OxyHostedContext.d.ts.map +1 -0
- package/lib/typescript/module/ui/context/oxyContextTypes.d.ts +19 -2
- package/lib/typescript/module/ui/context/oxyContextTypes.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/oxyRuntimeContext.d.ts +6 -0
- package/lib/typescript/module/ui/context/oxyRuntimeContext.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useAuth.d.ts +3 -0
- package/lib/typescript/module/ui/hooks/useAuth.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useOxyEvent.d.ts.map +1 -1
- package/lib/typescript/module/ui/icons/Ionicons.d.ts +1 -1
- package/lib/typescript/module/ui/icons/Ionicons.d.ts.map +1 -1
- package/lib/typescript/module/ui/icons/subsetGlyphMaps.d.ts +1 -0
- package/lib/typescript/module/ui/icons/subsetGlyphMaps.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/EditProfileFieldScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/ProfileLinkForm.d.ts +18 -0
- package/lib/typescript/module/ui/screens/ProfileLinkForm.d.ts.map +1 -0
- package/lib/typescript/module/ui/screens/ProfileLinksEditor.d.ts +14 -0
- package/lib/typescript/module/ui/screens/ProfileLinksEditor.d.ts.map +1 -0
- package/lib/typescript/module/ui/screens/linkFormat.d.ts +14 -2
- package/lib/typescript/module/ui/screens/linkFormat.d.ts.map +1 -1
- package/lib/typescript/module/ui/session/hostSession.d.ts +69 -0
- package/lib/typescript/module/ui/session/hostSession.d.ts.map +1 -0
- package/lib/typescript/module/ui/types/navigation.d.ts +24 -1
- package/lib/typescript/module/ui/types/navigation.d.ts.map +1 -1
- package/lib/typescript/module/ui/utils/identityCrypto.d.ts +4 -0
- package/lib/typescript/module/ui/utils/identityCrypto.d.ts.map +1 -1
- package/package.json +7 -7
- package/src/assets/fonts/icons/OxyServicesIonicons.ttf +0 -0
- package/src/assets/fonts/icons/OxyServicesMaterialCommunityIcons.ttf +0 -0
- package/src/assets/fonts/icons/manifest.json +5 -4
- package/src/index.ts +3 -0
- package/src/ui/boot/runProviderColdBoot.ts +12 -1
- package/src/ui/components/OxyProvider.tsx +77 -34
- package/src/ui/context/OxyContext.tsx +19 -4
- package/src/ui/context/OxyHostedContext.tsx +678 -0
- package/src/ui/context/oxyContextTypes.ts +21 -2
- package/src/ui/context/oxyRuntimeContext.ts +9 -1
- package/src/ui/hooks/useAuth.ts +13 -1
- package/src/ui/hooks/useOxyEvent.ts +8 -5
- package/src/ui/icons/subsetGlyphMaps.ts +1 -0
- package/src/ui/screens/EditProfileFieldScreen.tsx +19 -85
- package/src/ui/screens/ProfileLinkForm.tsx +131 -0
- package/src/ui/screens/ProfileLinksEditor.tsx +98 -0
- package/src/ui/screens/__tests__/linkFormat.test.ts +51 -8
- package/src/ui/screens/linkFormat.ts +28 -9
- package/src/ui/session/hostSession.ts +515 -0
- package/src/ui/types/navigation.ts +24 -1
- package/lib/commonjs/ui/screens/LinkListEditor.js +0 -105
- package/lib/commonjs/ui/screens/LinkListEditor.js.map +0 -1
- package/lib/module/ui/screens/LinkListEditor.js +0 -99
- package/lib/module/ui/screens/LinkListEditor.js.map +0 -1
- package/lib/typescript/commonjs/ui/screens/LinkListEditor.d.ts +0 -25
- package/lib/typescript/commonjs/ui/screens/LinkListEditor.d.ts.map +0 -1
- package/lib/typescript/module/ui/screens/LinkListEditor.d.ts +0 -25
- package/lib/typescript/module/ui/screens/LinkListEditor.d.ts.map +0 -1
- package/src/ui/screens/LinkListEditor.tsx +0 -113
|
@@ -4,6 +4,8 @@ import { AppState, Platform, StyleSheet } from 'react-native';
|
|
|
4
4
|
import { GestureHandlerRootView } from 'react-native-gesture-handler';
|
|
5
5
|
import type { OxyProviderProps } from '../types/navigation';
|
|
6
6
|
import { OxyRuntimeProvider, type OxyRuntimeProviderProps } from '../context/OxyContext';
|
|
7
|
+
import { OxyHostedRuntimeProvider } from '../context/OxyHostedContext';
|
|
8
|
+
import { getOxySessionHost } from '@oxy.so/core/host';
|
|
7
9
|
import { QueryClientProvider, focusManager, onlineManager } from '@tanstack/react-query';
|
|
8
10
|
import { SurfaceProvider } from '@oxy.so/bloom/surfaces';
|
|
9
11
|
import { ToastOutlet } from '@oxy.so/bloom/toast';
|
|
@@ -105,7 +107,20 @@ const OxyProvider: FC<OxyProviderProps> = ({
|
|
|
105
107
|
backgroundSession = false,
|
|
106
108
|
language,
|
|
107
109
|
campaignAttribution = false,
|
|
110
|
+
authStateStore,
|
|
108
111
|
}) => {
|
|
112
|
+
// A platform that holds the Oxy session (ADR 0058) registers its host before
|
|
113
|
+
// the app's code runs. Read once, like `baseURL`: a host registered later
|
|
114
|
+
// does not re-bind a mounted provider. `'identity'` is never hosted.
|
|
115
|
+
const [sessionHost] = useState(() => (sessionMode === 'account' ? getOxySessionHost() : null));
|
|
116
|
+
useEffect(() => {
|
|
117
|
+
if (__DEV__ && sessionHost && authStateStore) {
|
|
118
|
+
loggerUtil.warn(
|
|
119
|
+
'OxyProvider: authStateStore is ignored — a platform holds the session here (session host)',
|
|
120
|
+
{ component: 'OxyProvider' },
|
|
121
|
+
);
|
|
122
|
+
}
|
|
123
|
+
}, [sessionHost, authStateStore]);
|
|
109
124
|
const support = useMemo(
|
|
110
125
|
() => ({ onAskAlia, documentationUrl, aliaAvatar, oxyOneArtwork }),
|
|
111
126
|
[onAskAlia, documentationUrl, aliaAvatar, oxyOneArtwork],
|
|
@@ -253,42 +268,70 @@ const OxyProvider: FC<OxyProviderProps> = ({
|
|
|
253
268
|
// duplicate scope that silently shadows the consumer's configuration.
|
|
254
269
|
// It DOES set Bloom's locale (`BloomLocaleBridge`) to Oxy's language, but
|
|
255
270
|
// defers to a locale the app already set above it.
|
|
271
|
+
const providerChildren = (
|
|
272
|
+
<>
|
|
273
|
+
<SupervisionStateObserver />
|
|
274
|
+
{productAnalytics ? <ProductAnalyticsObserver analytics={productAnalytics} /> : null}
|
|
275
|
+
<AccountLanguageBoundary language={language}>
|
|
276
|
+
<BloomLocaleBridge>
|
|
277
|
+
<OxySupportContext.Provider value={support}>
|
|
278
|
+
<SurfaceProvider>
|
|
279
|
+
{requireAuth === 'off' ? (
|
|
280
|
+
children
|
|
281
|
+
) : (
|
|
282
|
+
<RequireOxyAuth prompt={requireAuth}>{children}</RequireOxyAuth>
|
|
283
|
+
)}
|
|
284
|
+
</SurfaceProvider>
|
|
285
|
+
</OxySupportContext.Provider>
|
|
286
|
+
<ToastOutlet />
|
|
287
|
+
</BloomLocaleBridge>
|
|
288
|
+
</AccountLanguageBoundary>
|
|
289
|
+
</>
|
|
290
|
+
);
|
|
291
|
+
|
|
256
292
|
const coreContent = (
|
|
257
293
|
<QueryClientProvider client={queryClient}>
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
294
|
+
{sessionHost ? (
|
|
295
|
+
<OxyHostedRuntimeProvider
|
|
296
|
+
session={sessionHost}
|
|
297
|
+
oxyServices={oxyServices as OxyRuntimeProviderProps['oxyServices']}
|
|
298
|
+
baseURL={baseURL}
|
|
299
|
+
authWebUrl={authWebUrl}
|
|
300
|
+
authRedirectUri={authRedirectUri}
|
|
301
|
+
authorizeBaseUrl={authorizeBaseUrl}
|
|
302
|
+
storageKeyPrefix={storageKeyPrefix}
|
|
303
|
+
clientId={clientId}
|
|
304
|
+
webAuthMode={webAuthMode}
|
|
305
|
+
legacyLanguageKeys={language?.legacyStorageKeys}
|
|
306
|
+
captureCampaignAttribution={campaignAttribution}
|
|
307
|
+
platformStorage={platformStorage}
|
|
308
|
+
accountQueries={accountQueries}
|
|
309
|
+
onAuthStateChange={onAuthStateChange as OxyRuntimeProviderProps['onAuthStateChange']}
|
|
310
|
+
>
|
|
311
|
+
{providerChildren}
|
|
312
|
+
</OxyHostedRuntimeProvider>
|
|
313
|
+
) : (
|
|
314
|
+
<OxyRuntimeProvider
|
|
315
|
+
oxyServices={oxyServices as OxyRuntimeProviderProps['oxyServices']}
|
|
316
|
+
baseURL={baseURL}
|
|
317
|
+
authWebUrl={authWebUrl}
|
|
318
|
+
authRedirectUri={authRedirectUri}
|
|
319
|
+
authorizeBaseUrl={authorizeBaseUrl}
|
|
320
|
+
storageKeyPrefix={storageKeyPrefix}
|
|
321
|
+
clientId={clientId}
|
|
322
|
+
sessionMode={sessionMode}
|
|
323
|
+
webAuthMode={webAuthMode}
|
|
324
|
+
backgroundSession={backgroundSession}
|
|
325
|
+
legacyLanguageKeys={language?.legacyStorageKeys}
|
|
326
|
+
captureCampaignAttribution={campaignAttribution}
|
|
327
|
+
platformStorage={platformStorage}
|
|
328
|
+
accountQueries={accountQueries}
|
|
329
|
+
authStateStore={authStateStore}
|
|
330
|
+
onAuthStateChange={onAuthStateChange as OxyRuntimeProviderProps['onAuthStateChange']}
|
|
331
|
+
>
|
|
332
|
+
{providerChildren}
|
|
333
|
+
</OxyRuntimeProvider>
|
|
334
|
+
)}
|
|
292
335
|
</QueryClientProvider>
|
|
293
336
|
);
|
|
294
337
|
|
|
@@ -168,6 +168,7 @@ export const OxyRuntimeProvider: React.FC<OxyRuntimeProviderProps> = ({
|
|
|
168
168
|
captureCampaignAttribution = false,
|
|
169
169
|
platformStorage,
|
|
170
170
|
accountQueries,
|
|
171
|
+
authStateStore: providedAuthStateStore,
|
|
171
172
|
onAuthStateChange,
|
|
172
173
|
onError,
|
|
173
174
|
}) => {
|
|
@@ -200,11 +201,19 @@ export const OxyRuntimeProvider: React.FC<OxyRuntimeProviderProps> = ({
|
|
|
200
201
|
// web; SecureStore session blob on native). Built ONCE per provider mount.
|
|
201
202
|
// Tracked, so a sign-in press can tell SYNCHRONOUSLY whether this origin
|
|
202
203
|
// holds a device credential (the browser bridge must open inside the press).
|
|
204
|
+
//
|
|
205
|
+
// A platform's setup client passes its own (`authStateStore`): then it is the
|
|
206
|
+
// ONLY place a credential is written — the shared device slot and the
|
|
207
|
+
// background credential below are off, so nothing reaches platform storage.
|
|
203
208
|
const authStoreRef = useRef<CredentialTrackingAuthStateStore | null>(null);
|
|
209
|
+
const ownsCredentialStorageRef = useRef(providedAuthStateStore === undefined);
|
|
204
210
|
if (!authStoreRef.current) {
|
|
205
|
-
authStoreRef.current = trackDeviceCredential(
|
|
211
|
+
authStoreRef.current = trackDeviceCredential(
|
|
212
|
+
providedAuthStateStore ?? createPlatformAuthStateStore({ sessionMode }),
|
|
213
|
+
);
|
|
206
214
|
}
|
|
207
215
|
const authStore: AuthStateStore = authStoreRef.current;
|
|
216
|
+
const usesSharedDeviceCredential = ownsCredentialStorageRef.current;
|
|
208
217
|
|
|
209
218
|
// Identity-bound session binding (`sessionMode: 'identity'`) — the platform pin
|
|
210
219
|
// store plus the memoised pinned account id every lane below binds to. Built
|
|
@@ -791,7 +800,9 @@ export const OxyRuntimeProvider: React.FC<OxyRuntimeProviderProps> = ({
|
|
|
791
800
|
...(!identity && !isWebBrowser()
|
|
792
801
|
? {
|
|
793
802
|
allowCommonsIdentityFallback: false,
|
|
794
|
-
sharedDeviceCredential:
|
|
803
|
+
sharedDeviceCredential: usesSharedDeviceCredential
|
|
804
|
+
? (createPlatformSharedDeviceCredentialStore() ?? undefined)
|
|
805
|
+
: undefined,
|
|
795
806
|
}
|
|
796
807
|
: {}),
|
|
797
808
|
});
|
|
@@ -806,7 +817,7 @@ export const OxyRuntimeProvider: React.FC<OxyRuntimeProviderProps> = ({
|
|
|
806
817
|
scheduler.dispose();
|
|
807
818
|
oxyServices.http.setAuthRefreshHandler(null);
|
|
808
819
|
};
|
|
809
|
-
}, [oxyServices, authStore, identity, runtime]);
|
|
820
|
+
}, [oxyServices, authStore, identity, runtime, usesSharedDeviceCredential]);
|
|
810
821
|
|
|
811
822
|
// ── Session commit funnel ────────────────────────────────────────────────
|
|
812
823
|
// The single place a session becomes committed: plant tokens, persist the
|
|
@@ -1473,6 +1484,7 @@ export const OxyRuntimeProvider: React.FC<OxyRuntimeProviderProps> = ({
|
|
|
1473
1484
|
authRedirectUri,
|
|
1474
1485
|
sessionMode,
|
|
1475
1486
|
identity: identity?.binding,
|
|
1487
|
+
useSharedDeviceCredential: usesSharedDeviceCredential,
|
|
1476
1488
|
resolveSessionLane: resolveRegisteredLane,
|
|
1477
1489
|
beforeDeviceBoot: identity
|
|
1478
1490
|
? async () => {
|
|
@@ -1504,6 +1516,7 @@ export const OxyRuntimeProvider: React.FC<OxyRuntimeProviderProps> = ({
|
|
|
1504
1516
|
authRedirectUri,
|
|
1505
1517
|
sessionMode,
|
|
1506
1518
|
identity,
|
|
1519
|
+
usesSharedDeviceCredential,
|
|
1507
1520
|
syncDeviceCredentialToHost,
|
|
1508
1521
|
sessionClient,
|
|
1509
1522
|
setTokenReady,
|
|
@@ -1760,7 +1773,9 @@ export const OxyRuntimeProvider: React.FC<OxyRuntimeProviderProps> = ({
|
|
|
1760
1773
|
// needs a bearer, and keyed on the signed-in account so a sign-out or an
|
|
1761
1774
|
// account switch revokes the credential before anything else happens.
|
|
1762
1775
|
useBackgroundSessionSync({
|
|
1763
|
-
|
|
1776
|
+
// A platform's own store (`authStateStore`) means no credential of ours
|
|
1777
|
+
// anywhere else, the background one included.
|
|
1778
|
+
enabled: backgroundSession && usesSharedDeviceCredential,
|
|
1764
1779
|
oxyServices,
|
|
1765
1780
|
userId: user?.id ?? null,
|
|
1766
1781
|
canUsePrivateApi,
|