@oxy.so/services 14.10.0 → 14.11.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 +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/session/hostSession.js +474 -0
- package/lib/commonjs/ui/session/hostSession.js.map +1 -0
- 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/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/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 +9 -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/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 +9 -0
- package/lib/typescript/module/ui/utils/identityCrypto.d.ts.map +1 -1
- package/package.json +4 -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/session/hostSession.ts +515 -0
- package/src/ui/types/navigation.ts +24 -1
|
@@ -4,7 +4,7 @@ import type { AccountQueriesConfig } from '../hooks/accountQueryPersistence';
|
|
|
4
4
|
import type { RouteName } from '../navigation/routes';
|
|
5
5
|
import type { User } from '@oxy.so/core';
|
|
6
6
|
import type { ClientSession } from '@oxy.so/core';
|
|
7
|
-
import type { SessionMode } from '@oxy.so/core/session';
|
|
7
|
+
import type { AuthStateStore, SessionMode } from '@oxy.so/core/session';
|
|
8
8
|
import type { WebAuthMode } from '../oauth/types';
|
|
9
9
|
import type { ProductAnalytics } from '../analytics/productAnalytics';
|
|
10
10
|
|
|
@@ -119,6 +119,13 @@ export interface OxyProviderProps {
|
|
|
119
119
|
* skipped — it commits whichever account the IdP resolves, which is not
|
|
120
120
|
* necessarily the local key's owner.
|
|
121
121
|
*
|
|
122
|
+
* On a platform that holds the Oxy session — OxyOS, Astro — the platform
|
|
123
|
+
* registers a session host (`@oxy.so/core/host`, ADR 0058) before the app
|
|
124
|
+
* runs, and an `'account'` provider takes its session from it: the
|
|
125
|
+
* platform's token and account, nothing persisted, and `signIn()`,
|
|
126
|
+
* `openAccountDialog()`, a switch and `logout()` handed to the platform's
|
|
127
|
+
* own UI. The app does not choose. `'identity'` is never hosted.
|
|
128
|
+
*
|
|
122
129
|
* Read once at mount, like `baseURL` / `oxyServices`: changing it on a
|
|
123
130
|
* mounted provider does not re-bind the session.
|
|
124
131
|
* @default 'account'
|
|
@@ -184,6 +191,22 @@ export interface OxyProviderProps {
|
|
|
184
191
|
language?: OxyLanguageConfig;
|
|
185
192
|
/** Persist bounded first-touch link labels and attach them only to a new account. */
|
|
186
193
|
campaignAttribution?: boolean;
|
|
194
|
+
/**
|
|
195
|
+
* The seam for a PLATFORM'S SETUP CLIENT (OxyOS's login screen): where this
|
|
196
|
+
* provider persists the session credential instead of the platform's own
|
|
197
|
+
* storage. Every credential write — `{ deviceId, deviceSecret }`, the warm
|
|
198
|
+
* token, the sign-out marker — goes through it and nowhere else: no secure
|
|
199
|
+
* store, no `localStorage`, no shared device slot (the sibling-app lane is
|
|
200
|
+
* off) and no background credential (`backgroundSession` is ignored). The
|
|
201
|
+
* email-code, password and authenticator sign-ins and the "add a password"
|
|
202
|
+
* flow (ADR 0030) run as usual; `save()` receives the credential the moment
|
|
203
|
+
* a sign-in commits, so the platform can take it over.
|
|
204
|
+
*
|
|
205
|
+
* Ordinary apps never pass it. Never combined with a session host: when a
|
|
206
|
+
* platform has registered one (`@oxy.so/core/host`), the host wins and this
|
|
207
|
+
* is ignored. Read once, at mount.
|
|
208
|
+
*/
|
|
209
|
+
authStateStore?: AuthStateStore;
|
|
187
210
|
}
|
|
188
211
|
|
|
189
212
|
export interface OxyLanguageConfig {
|