@oxyhq/services 21.0.0 → 22.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 +13 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/ui/boot/runProviderColdBoot.js +12 -2
- package/lib/commonjs/ui/boot/runProviderColdBoot.js.map +1 -1
- package/lib/commonjs/ui/components/OxyAccountDialog.js +46 -19
- package/lib/commonjs/ui/components/OxyAccountDialog.js.map +1 -1
- package/lib/commonjs/ui/components/OxyProvider.js +2 -0
- package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
- package/lib/commonjs/ui/context/OxyContext.js +80 -59
- package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
- package/lib/commonjs/ui/context/passkeyFlow.js +118 -0
- package/lib/commonjs/ui/context/passkeyFlow.js.map +1 -0
- package/lib/commonjs/ui/hooks/queries/queryKeys.js +18 -2
- package/lib/commonjs/ui/hooks/queries/queryKeys.js.map +1 -1
- package/lib/commonjs/ui/hooks/queries/useAuthMethods.js +49 -0
- package/lib/commonjs/ui/hooks/queries/useAuthMethods.js.map +1 -0
- package/lib/commonjs/ui/utils/crossOriginRestore.js +26 -0
- package/lib/commonjs/ui/utils/crossOriginRestore.js.map +1 -1
- package/lib/commonjs/webauthn/passkeyClient.js +39 -0
- package/lib/commonjs/webauthn/passkeyClient.js.map +1 -0
- package/lib/commonjs/webauthn/passkeyClient.native.js +34 -0
- package/lib/commonjs/webauthn/passkeyClient.native.js.map +1 -0
- package/lib/commonjs/webauthn/passkeyClient.web.js +57 -0
- package/lib/commonjs/webauthn/passkeyClient.web.js.map +1 -0
- package/lib/module/index.js +2 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/ui/boot/runProviderColdBoot.js +13 -3
- package/lib/module/ui/boot/runProviderColdBoot.js.map +1 -1
- package/lib/module/ui/components/OxyAccountDialog.js +46 -19
- package/lib/module/ui/components/OxyAccountDialog.js.map +1 -1
- package/lib/module/ui/components/OxyProvider.js +2 -0
- package/lib/module/ui/components/OxyProvider.js.map +1 -1
- package/lib/module/ui/context/OxyContext.js +80 -59
- package/lib/module/ui/context/OxyContext.js.map +1 -1
- package/lib/module/ui/context/passkeyFlow.js +111 -0
- package/lib/module/ui/context/passkeyFlow.js.map +1 -0
- package/lib/module/ui/hooks/queries/queryKeys.js +15 -0
- package/lib/module/ui/hooks/queries/queryKeys.js.map +1 -1
- package/lib/module/ui/hooks/queries/useAuthMethods.js +45 -0
- package/lib/module/ui/hooks/queries/useAuthMethods.js.map +1 -0
- package/lib/module/ui/utils/crossOriginRestore.js +26 -1
- package/lib/module/ui/utils/crossOriginRestore.js.map +1 -1
- package/lib/module/webauthn/passkeyClient.js +33 -0
- package/lib/module/webauthn/passkeyClient.js.map +1 -0
- package/lib/module/webauthn/passkeyClient.native.js +28 -0
- package/lib/module/webauthn/passkeyClient.native.js.map +1 -0
- package/lib/module/webauthn/passkeyClient.web.js +52 -0
- package/lib/module/webauthn/passkeyClient.web.js.map +1 -0
- package/lib/typescript/commonjs/index.d.ts +3 -2
- 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/OxyAccountDialog.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 +1 -1
- package/lib/typescript/commonjs/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/oxyContextTypes.d.ts +41 -20
- package/lib/typescript/commonjs/ui/context/oxyContextTypes.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/passkeyFlow.d.ts +96 -0
- package/lib/typescript/commonjs/ui/context/passkeyFlow.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/hooks/mutations/useAccountMutations.d.ts +2 -2
- package/lib/typescript/commonjs/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/queries/queryKeys.d.ts +9 -0
- package/lib/typescript/commonjs/ui/hooks/queries/queryKeys.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/queries/useAuthMethods.d.ts +212 -0
- package/lib/typescript/commonjs/ui/hooks/queries/useAuthMethods.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/types/navigation.d.ts +8 -0
- package/lib/typescript/commonjs/ui/types/navigation.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/utils/crossOriginRestore.d.ts +19 -0
- package/lib/typescript/commonjs/ui/utils/crossOriginRestore.d.ts.map +1 -1
- package/lib/typescript/commonjs/webauthn/passkeyClient.d.ts +20 -0
- package/lib/typescript/commonjs/webauthn/passkeyClient.d.ts.map +1 -0
- package/lib/typescript/commonjs/webauthn/passkeyClient.native.d.ts +15 -0
- package/lib/typescript/commonjs/webauthn/passkeyClient.native.d.ts.map +1 -0
- package/lib/typescript/commonjs/webauthn/passkeyClient.web.d.ts +36 -0
- package/lib/typescript/commonjs/webauthn/passkeyClient.web.d.ts.map +1 -0
- package/lib/typescript/module/index.d.ts +3 -2
- 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/OxyAccountDialog.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 +1 -1
- package/lib/typescript/module/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/oxyContextTypes.d.ts +41 -20
- package/lib/typescript/module/ui/context/oxyContextTypes.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/passkeyFlow.d.ts +96 -0
- package/lib/typescript/module/ui/context/passkeyFlow.d.ts.map +1 -0
- package/lib/typescript/module/ui/hooks/mutations/useAccountMutations.d.ts +2 -2
- package/lib/typescript/module/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/queries/queryKeys.d.ts +9 -0
- package/lib/typescript/module/ui/hooks/queries/queryKeys.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/queries/useAuthMethods.d.ts +212 -0
- package/lib/typescript/module/ui/hooks/queries/useAuthMethods.d.ts.map +1 -0
- package/lib/typescript/module/ui/types/navigation.d.ts +8 -0
- package/lib/typescript/module/ui/types/navigation.d.ts.map +1 -1
- package/lib/typescript/module/ui/utils/crossOriginRestore.d.ts +19 -0
- package/lib/typescript/module/ui/utils/crossOriginRestore.d.ts.map +1 -1
- package/lib/typescript/module/webauthn/passkeyClient.d.ts +20 -0
- package/lib/typescript/module/webauthn/passkeyClient.d.ts.map +1 -0
- package/lib/typescript/module/webauthn/passkeyClient.native.d.ts +15 -0
- package/lib/typescript/module/webauthn/passkeyClient.native.d.ts.map +1 -0
- package/lib/typescript/module/webauthn/passkeyClient.web.d.ts +36 -0
- package/lib/typescript/module/webauthn/passkeyClient.web.d.ts.map +1 -0
- package/package.json +6 -5
- package/src/index.ts +3 -1
- package/src/ui/boot/runProviderColdBoot.ts +24 -1
- package/src/ui/components/OxyAccountDialog.tsx +57 -14
- package/src/ui/components/OxyProvider.tsx +2 -0
- package/src/ui/context/OxyContext.tsx +85 -63
- package/src/ui/context/__tests__/passkeyFlow.test.ts +244 -0
- package/src/ui/context/oxyContextTypes.ts +41 -19
- package/src/ui/context/passkeyFlow.ts +154 -0
- package/src/ui/hooks/queries/queryKeys.ts +14 -0
- package/src/ui/hooks/queries/useAuthMethods.ts +45 -0
- package/src/ui/types/navigation.ts +8 -0
- package/src/ui/utils/__tests__/crossOriginRestore.test.ts +143 -0
- package/src/ui/utils/crossOriginRestore.ts +34 -0
- package/src/webauthn/passkeyClient.native.ts +26 -0
- package/src/webauthn/passkeyClient.ts +31 -0
- package/src/webauthn/passkeyClient.web.ts +56 -0
|
@@ -51,6 +51,10 @@ export declare const queryKeys: {
|
|
|
51
51
|
readonly recent: (limit: number) => readonly ["security", "recent", number];
|
|
52
52
|
readonly infinite: (limit: number, eventType?: string) => readonly ["security", "infinite", number, string | undefined];
|
|
53
53
|
};
|
|
54
|
+
readonly authMethods: {
|
|
55
|
+
readonly all: readonly ["authMethods"];
|
|
56
|
+
readonly list: (userId?: string) => readonly ["authMethods", "list", string];
|
|
57
|
+
};
|
|
54
58
|
readonly storage: {
|
|
55
59
|
readonly all: readonly ["storage"];
|
|
56
60
|
readonly usage: (accountScope?: string) => readonly ["storage", "usage", string | undefined];
|
|
@@ -99,6 +103,11 @@ export declare const invalidateSecurityQueries: (queryClient: QueryClient) => vo
|
|
|
99
103
|
* Helper to invalidate all storage-usage queries
|
|
100
104
|
*/
|
|
101
105
|
export declare const invalidateStorageQueries: (queryClient: QueryClient) => void;
|
|
106
|
+
/**
|
|
107
|
+
* Helper to invalidate the user's linked auth-methods list (call after linking
|
|
108
|
+
* or removing a passkey / password / identity key).
|
|
109
|
+
*/
|
|
110
|
+
export declare const invalidateAuthMethodsQueries: (queryClient: QueryClient) => void;
|
|
102
111
|
/**
|
|
103
112
|
* Helper to invalidate all payments / wallet / subscription queries
|
|
104
113
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queryKeys.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/hooks/queries/queryKeys.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEzD,eAAO,MAAM,SAAS;;;;oCAKC,MAAM,EAAE;;qCAEP,MAAM;uCACJ,MAAM,GAAG,IAAI;;;;;;iCAWnB,MAAM,EAAE;;kCAEP,MAAM;sCACF,MAAM;;;;;iCAOX,MAAM;;qCAEF,MAAM;;oCAEP,MAAM;;;;;uCAOH,MAAM;;oCAET,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AAM,wBAAwB,GAAI,aAAa,WAAW,KAAG,IAEnE,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,4BAA4B,GAAI,aAAa,WAAW,KAAG,IAEvE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,yBAAyB,GAAI,aAAa,WAAW,KAAG,IAEpE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,8BAA8B,GAAI,aAAa,WAAW,KAAG,IAEzE,CAAC"}
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
import type { AuthMethodEntry, AuthMethodsResponse } from '@oxyhq/contracts';
|
|
2
|
+
/**
|
|
3
|
+
* The current account's linked authentication methods (`GET /auth/methods`),
|
|
4
|
+
* plus convenience projections. Backs the security / account surfaces that let a
|
|
5
|
+
* user see and manage their passwords, identity key, social logins, and passkeys.
|
|
6
|
+
*
|
|
7
|
+
* `passkeys` is the `type === 'webauthn'` subset — one entry per registered
|
|
8
|
+
* credential. Invalidate via `queryKeys.authMethods.all` after linking a passkey
|
|
9
|
+
* (`useOxy().addPasskey()` does this) or removing one.
|
|
10
|
+
*/
|
|
11
|
+
export declare const useAuthMethods: (options?: {
|
|
12
|
+
enabled?: boolean;
|
|
13
|
+
}) => {
|
|
14
|
+
/** Every linked auth method. Empty while loading. */
|
|
15
|
+
methods: readonly AuthMethodEntry[];
|
|
16
|
+
/** The registered passkeys (a `type === 'webauthn'` subset of `methods`). */
|
|
17
|
+
passkeys: AuthMethodEntry[];
|
|
18
|
+
/** The account's DID, or `null` while loading. */
|
|
19
|
+
did: string | null;
|
|
20
|
+
data: NoInfer<AuthMethodsResponse>;
|
|
21
|
+
error: Error;
|
|
22
|
+
isError: true;
|
|
23
|
+
isPending: false;
|
|
24
|
+
isLoading: false;
|
|
25
|
+
isLoadingError: false;
|
|
26
|
+
isRefetchError: true;
|
|
27
|
+
isSuccess: false;
|
|
28
|
+
isPlaceholderData: false;
|
|
29
|
+
status: "error";
|
|
30
|
+
dataUpdatedAt: number;
|
|
31
|
+
errorUpdatedAt: number;
|
|
32
|
+
failureCount: number;
|
|
33
|
+
failureReason: Error | null;
|
|
34
|
+
errorUpdateCount: number;
|
|
35
|
+
isFetched: boolean;
|
|
36
|
+
isFetchedAfterMount: boolean;
|
|
37
|
+
isFetching: boolean;
|
|
38
|
+
isInitialLoading: boolean;
|
|
39
|
+
isPaused: boolean;
|
|
40
|
+
isRefetching: boolean;
|
|
41
|
+
isStale: boolean;
|
|
42
|
+
isEnabled: boolean;
|
|
43
|
+
refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<NoInfer<AuthMethodsResponse>, Error>>;
|
|
44
|
+
fetchStatus: import("@tanstack/query-core").FetchStatus;
|
|
45
|
+
promise: Promise<NoInfer<AuthMethodsResponse>>;
|
|
46
|
+
} | {
|
|
47
|
+
/** Every linked auth method. Empty while loading. */
|
|
48
|
+
methods: readonly AuthMethodEntry[];
|
|
49
|
+
/** The registered passkeys (a `type === 'webauthn'` subset of `methods`). */
|
|
50
|
+
passkeys: AuthMethodEntry[];
|
|
51
|
+
/** The account's DID, or `null` while loading. */
|
|
52
|
+
did: string | null;
|
|
53
|
+
data: NoInfer<AuthMethodsResponse>;
|
|
54
|
+
error: null;
|
|
55
|
+
isError: false;
|
|
56
|
+
isPending: false;
|
|
57
|
+
isLoading: false;
|
|
58
|
+
isLoadingError: false;
|
|
59
|
+
isRefetchError: false;
|
|
60
|
+
isSuccess: true;
|
|
61
|
+
isPlaceholderData: false;
|
|
62
|
+
status: "success";
|
|
63
|
+
dataUpdatedAt: number;
|
|
64
|
+
errorUpdatedAt: number;
|
|
65
|
+
failureCount: number;
|
|
66
|
+
failureReason: Error | null;
|
|
67
|
+
errorUpdateCount: number;
|
|
68
|
+
isFetched: boolean;
|
|
69
|
+
isFetchedAfterMount: boolean;
|
|
70
|
+
isFetching: boolean;
|
|
71
|
+
isInitialLoading: boolean;
|
|
72
|
+
isPaused: boolean;
|
|
73
|
+
isRefetching: boolean;
|
|
74
|
+
isStale: boolean;
|
|
75
|
+
isEnabled: boolean;
|
|
76
|
+
refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<NoInfer<AuthMethodsResponse>, Error>>;
|
|
77
|
+
fetchStatus: import("@tanstack/query-core").FetchStatus;
|
|
78
|
+
promise: Promise<NoInfer<AuthMethodsResponse>>;
|
|
79
|
+
} | {
|
|
80
|
+
/** Every linked auth method. Empty while loading. */
|
|
81
|
+
methods: readonly AuthMethodEntry[];
|
|
82
|
+
/** The registered passkeys (a `type === 'webauthn'` subset of `methods`). */
|
|
83
|
+
passkeys: AuthMethodEntry[];
|
|
84
|
+
/** The account's DID, or `null` while loading. */
|
|
85
|
+
did: string | null;
|
|
86
|
+
data: undefined;
|
|
87
|
+
error: Error;
|
|
88
|
+
isError: true;
|
|
89
|
+
isPending: false;
|
|
90
|
+
isLoading: false;
|
|
91
|
+
isLoadingError: true;
|
|
92
|
+
isRefetchError: false;
|
|
93
|
+
isSuccess: false;
|
|
94
|
+
isPlaceholderData: false;
|
|
95
|
+
status: "error";
|
|
96
|
+
dataUpdatedAt: number;
|
|
97
|
+
errorUpdatedAt: number;
|
|
98
|
+
failureCount: number;
|
|
99
|
+
failureReason: Error | null;
|
|
100
|
+
errorUpdateCount: number;
|
|
101
|
+
isFetched: boolean;
|
|
102
|
+
isFetchedAfterMount: boolean;
|
|
103
|
+
isFetching: boolean;
|
|
104
|
+
isInitialLoading: boolean;
|
|
105
|
+
isPaused: boolean;
|
|
106
|
+
isRefetching: boolean;
|
|
107
|
+
isStale: boolean;
|
|
108
|
+
isEnabled: boolean;
|
|
109
|
+
refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<NoInfer<AuthMethodsResponse>, Error>>;
|
|
110
|
+
fetchStatus: import("@tanstack/query-core").FetchStatus;
|
|
111
|
+
promise: Promise<NoInfer<AuthMethodsResponse>>;
|
|
112
|
+
} | {
|
|
113
|
+
/** Every linked auth method. Empty while loading. */
|
|
114
|
+
methods: readonly AuthMethodEntry[];
|
|
115
|
+
/** The registered passkeys (a `type === 'webauthn'` subset of `methods`). */
|
|
116
|
+
passkeys: AuthMethodEntry[];
|
|
117
|
+
/** The account's DID, or `null` while loading. */
|
|
118
|
+
did: string | null;
|
|
119
|
+
data: undefined;
|
|
120
|
+
error: null;
|
|
121
|
+
isError: false;
|
|
122
|
+
isPending: true;
|
|
123
|
+
isLoading: true;
|
|
124
|
+
isLoadingError: false;
|
|
125
|
+
isRefetchError: false;
|
|
126
|
+
isSuccess: false;
|
|
127
|
+
isPlaceholderData: false;
|
|
128
|
+
status: "pending";
|
|
129
|
+
dataUpdatedAt: number;
|
|
130
|
+
errorUpdatedAt: number;
|
|
131
|
+
failureCount: number;
|
|
132
|
+
failureReason: Error | null;
|
|
133
|
+
errorUpdateCount: number;
|
|
134
|
+
isFetched: boolean;
|
|
135
|
+
isFetchedAfterMount: boolean;
|
|
136
|
+
isFetching: boolean;
|
|
137
|
+
isInitialLoading: boolean;
|
|
138
|
+
isPaused: boolean;
|
|
139
|
+
isRefetching: boolean;
|
|
140
|
+
isStale: boolean;
|
|
141
|
+
isEnabled: boolean;
|
|
142
|
+
refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<NoInfer<AuthMethodsResponse>, Error>>;
|
|
143
|
+
fetchStatus: import("@tanstack/query-core").FetchStatus;
|
|
144
|
+
promise: Promise<NoInfer<AuthMethodsResponse>>;
|
|
145
|
+
} | {
|
|
146
|
+
/** Every linked auth method. Empty while loading. */
|
|
147
|
+
methods: readonly AuthMethodEntry[];
|
|
148
|
+
/** The registered passkeys (a `type === 'webauthn'` subset of `methods`). */
|
|
149
|
+
passkeys: AuthMethodEntry[];
|
|
150
|
+
/** The account's DID, or `null` while loading. */
|
|
151
|
+
did: string | null;
|
|
152
|
+
data: undefined;
|
|
153
|
+
error: null;
|
|
154
|
+
isError: false;
|
|
155
|
+
isPending: true;
|
|
156
|
+
isLoadingError: false;
|
|
157
|
+
isRefetchError: false;
|
|
158
|
+
isSuccess: false;
|
|
159
|
+
isPlaceholderData: false;
|
|
160
|
+
status: "pending";
|
|
161
|
+
dataUpdatedAt: number;
|
|
162
|
+
errorUpdatedAt: number;
|
|
163
|
+
failureCount: number;
|
|
164
|
+
failureReason: Error | null;
|
|
165
|
+
errorUpdateCount: number;
|
|
166
|
+
isFetched: boolean;
|
|
167
|
+
isFetchedAfterMount: boolean;
|
|
168
|
+
isFetching: boolean;
|
|
169
|
+
isLoading: boolean;
|
|
170
|
+
isInitialLoading: boolean;
|
|
171
|
+
isPaused: boolean;
|
|
172
|
+
isRefetching: boolean;
|
|
173
|
+
isStale: boolean;
|
|
174
|
+
isEnabled: boolean;
|
|
175
|
+
refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<NoInfer<AuthMethodsResponse>, Error>>;
|
|
176
|
+
fetchStatus: import("@tanstack/query-core").FetchStatus;
|
|
177
|
+
promise: Promise<NoInfer<AuthMethodsResponse>>;
|
|
178
|
+
} | {
|
|
179
|
+
/** Every linked auth method. Empty while loading. */
|
|
180
|
+
methods: readonly AuthMethodEntry[];
|
|
181
|
+
/** The registered passkeys (a `type === 'webauthn'` subset of `methods`). */
|
|
182
|
+
passkeys: AuthMethodEntry[];
|
|
183
|
+
/** The account's DID, or `null` while loading. */
|
|
184
|
+
did: string | null;
|
|
185
|
+
data: NoInfer<AuthMethodsResponse>;
|
|
186
|
+
isError: false;
|
|
187
|
+
error: null;
|
|
188
|
+
isPending: false;
|
|
189
|
+
isLoading: false;
|
|
190
|
+
isLoadingError: false;
|
|
191
|
+
isRefetchError: false;
|
|
192
|
+
isSuccess: true;
|
|
193
|
+
isPlaceholderData: true;
|
|
194
|
+
status: "success";
|
|
195
|
+
dataUpdatedAt: number;
|
|
196
|
+
errorUpdatedAt: number;
|
|
197
|
+
failureCount: number;
|
|
198
|
+
failureReason: Error | null;
|
|
199
|
+
errorUpdateCount: number;
|
|
200
|
+
isFetched: boolean;
|
|
201
|
+
isFetchedAfterMount: boolean;
|
|
202
|
+
isFetching: boolean;
|
|
203
|
+
isInitialLoading: boolean;
|
|
204
|
+
isPaused: boolean;
|
|
205
|
+
isRefetching: boolean;
|
|
206
|
+
isStale: boolean;
|
|
207
|
+
isEnabled: boolean;
|
|
208
|
+
refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<NoInfer<AuthMethodsResponse>, Error>>;
|
|
209
|
+
fetchStatus: import("@tanstack/query-core").FetchStatus;
|
|
210
|
+
promise: Promise<NoInfer<AuthMethodsResponse>>;
|
|
211
|
+
};
|
|
212
|
+
//# sourceMappingURL=useAuthMethods.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAuthMethods.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/hooks/queries/useAuthMethods.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAO7E;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc,GAAI,UAAU;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE;IAmB1D,qDAAqD;;IAErD,6EAA6E;;IAE7E,kDAAkD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAJlD,qDAAqD;;IAErD,6EAA6E;;IAE7E,kDAAkD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAJlD,qDAAqD;;IAErD,6EAA6E;;IAE7E,kDAAkD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAJlD,qDAAqD;;IAErD,6EAA6E;;IAE7E,kDAAkD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAJlD,qDAAqD;;IAErD,6EAA6E;;IAE7E,kDAAkD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAJlD,qDAAqD;;IAErD,6EAA6E;;IAE7E,kDAAkD;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGrD,CAAC"}
|
|
@@ -41,6 +41,14 @@ export interface OxyProviderProps {
|
|
|
41
41
|
baseURL?: string;
|
|
42
42
|
authWebUrl?: string;
|
|
43
43
|
authRedirectUri?: string;
|
|
44
|
+
/**
|
|
45
|
+
* Authorize endpoint override for silent cross-origin session restore
|
|
46
|
+
* (web cross-app SSO on cold boot). Defaults to the production Oxy IdP
|
|
47
|
+
* (`https://auth.oxy.so/authorize`) when unset. Set this from an env var
|
|
48
|
+
* (e.g. Vite `VITE_OXY_AUTHORIZE_URL`, Expo `EXPO_PUBLIC_OXY_AUTHORIZE_URL`)
|
|
49
|
+
* so a local/staging deployment targets its own IdP instead of production.
|
|
50
|
+
*/
|
|
51
|
+
authorizeBaseUrl?: string;
|
|
44
52
|
queryClient?: QueryClient;
|
|
45
53
|
/** Sync device credentials to auth.oxy.so after interactive sign-in. @default true */
|
|
46
54
|
hubSync?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navigation.d.ts","sourceRoot":"","sources":["../../../../../src/ui/types/navigation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAItD,MAAM,WAAW,cAAc;IAC3B,SAAS,EAAE,MAAM,OAAO,CAAC;IACzB,MAAM,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,MAAM,WAAW,eAAe;IAE5B,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,SAAS,EAAE,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;IACxE,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM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CAAC,EAAE,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,OAAO,CAAC;IAMtB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CAC1B;AAED,MAAM,WAAW,gBAAgB;IAC7B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAC5C,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;;;;;OAQG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;;;;OAMG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,sFAAsF;IACtF,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;;;;OAOG;IACH,WAAW,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC;CACzC"}
|
|
@@ -5,11 +5,30 @@ export declare function isCrossOriginRestoreBlocked(): boolean;
|
|
|
5
5
|
export declare function markCrossOriginRestoreAttempted(): void;
|
|
6
6
|
/** Clear all cross-origin restore loop guards (call on sign-out). */
|
|
7
7
|
export declare function clearCrossOriginRestoreGuards(): void;
|
|
8
|
+
/**
|
|
9
|
+
* Whether cold boot should attempt silent cross-origin OAuth restore for the
|
|
10
|
+
* given web origin.
|
|
11
|
+
*
|
|
12
|
+
* Mirrors the hub-sync WRITE gate (`syncHubAfterSignIn`): only OFFICIAL Oxy web
|
|
13
|
+
* origins participate in cross-app SSO — a random third-party / preview origin
|
|
14
|
+
* must never have its tab bounced to the IdP. Additionally, loopback / local-dev
|
|
15
|
+
* origins are EXCLUDED here even though {@link isOfficialWebOrigin} treats them
|
|
16
|
+
* as official: a developer's local app must never be redirected to a hosted IdP
|
|
17
|
+
* on cold boot (it signs in through the in-app dialog instead). The central IdP
|
|
18
|
+
* hub's own origin is excluded to avoid a wasteful self-hop.
|
|
19
|
+
*/
|
|
20
|
+
export declare function isSilentRestoreEligibleOrigin(origin: string): boolean;
|
|
8
21
|
export interface SilentOAuthRestoreOptions {
|
|
9
22
|
oxyServices: OxyServices;
|
|
10
23
|
clientId: string;
|
|
11
24
|
redirectUri?: string;
|
|
12
25
|
scope?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Authorize endpoint override (env-configurable per deployment). Defaults to
|
|
28
|
+
* the production Oxy IdP when unset, so a local/staging app points silent
|
|
29
|
+
* restore at its OWN IdP instead of production `auth.oxy.so`.
|
|
30
|
+
*/
|
|
31
|
+
authorizeBaseUrl?: string;
|
|
13
32
|
}
|
|
14
33
|
/**
|
|
15
34
|
* Top-level redirect to auth.oxy.so/authorize with `prompt=none` for silent
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"crossOriginRestore.d.ts","sourceRoot":"","sources":["../../../../../src/ui/utils/crossOriginRestore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"crossOriginRestore.d.ts","sourceRoot":"","sources":["../../../../../src/ui/utils/crossOriginRestore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAqB/C,8EAA8E;AAC9E,wBAAgB,2BAA2B,IAAI,OAAO,CAOrD;AAED,iFAAiF;AACjF,wBAAgB,+BAA+B,IAAI,IAAI,CAKtD;AAED,qEAAqE;AACrE,wBAAgB,6BAA6B,IAAI,IAAI,CAMpD;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,6BAA6B,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAIrE;AAED,MAAM,WAAW,yBAAyB;IACxC,WAAW,EAAE,WAAW,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED;;;GAGG;AACH,wBAAsB,4BAA4B,CAChD,IAAI,EAAE,yBAAyB,GAC9B,OAAO,CAAC,OAAO,CAAC,CAiDlB;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,IAAI,gBAAgB,GAAG,kBAAkB,GAAG,IAAI,CAsBtF"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Passkey / WebAuthn ceremony client — clean default (non-web) implementation.
|
|
3
|
+
*
|
|
4
|
+
* This is the base module TypeScript resolves for TYPES and any bundler that
|
|
5
|
+
* does not pick a platform variant. It intentionally imports NOTHING browser-
|
|
6
|
+
* specific (no `@simplewebauthn/browser`) so it stays safe for Metro, native
|
|
7
|
+
* builds, and SSR. The real ceremony lives in `passkeyClient.web.ts`; native
|
|
8
|
+
* passkeys are Commons' job, so there is no WebAuthn ceremony here.
|
|
9
|
+
*
|
|
10
|
+
* `isPasskeySupported()` returns `false` (no relying-party origin / no browser
|
|
11
|
+
* WebAuthn API), and the ceremony helpers throw a clear error so a caller that
|
|
12
|
+
* skipped the support gate fails loudly instead of silently.
|
|
13
|
+
*/
|
|
14
|
+
/** Always `false` off the web — there is no relying-party origin or WebAuthn API. */
|
|
15
|
+
export declare function isPasskeySupported(): boolean;
|
|
16
|
+
/** Not available off the web — throws. Guard with {@link isPasskeySupported} first. */
|
|
17
|
+
export declare function runRegistrationCeremony(_optionsJSON: unknown): Promise<unknown>;
|
|
18
|
+
/** Not available off the web — throws. Guard with {@link isPasskeySupported} first. */
|
|
19
|
+
export declare function runAuthenticationCeremony(_optionsJSON: unknown): Promise<unknown>;
|
|
20
|
+
//# sourceMappingURL=passkeyClient.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"passkeyClient.d.ts","sourceRoot":"","sources":["../../../../src/webauthn/passkeyClient.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAKH,qFAAqF;AACrF,wBAAgB,kBAAkB,IAAI,OAAO,CAE5C;AAED,uFAAuF;AACvF,wBAAsB,uBAAuB,CAAC,YAAY,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAErF;AAED,uFAAuF;AACvF,wBAAsB,yBAAyB,CAAC,YAAY,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAEvF"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Passkey / WebAuthn ceremony client — NATIVE implementation.
|
|
3
|
+
*
|
|
4
|
+
* React Native has no browser WebAuthn API, and Oxy's native passkey story is
|
|
5
|
+
* Commons (shared-keychain / QR handoff), NOT `navigator.credentials`. So this
|
|
6
|
+
* variant imports NOTHING browser-specific and mirrors the clean default:
|
|
7
|
+
* unsupported, and the ceremony helpers throw if a caller skipped the gate.
|
|
8
|
+
*/
|
|
9
|
+
/** Always `false` on native — there is no browser WebAuthn API. */
|
|
10
|
+
export declare function isPasskeySupported(): boolean;
|
|
11
|
+
/** Not available on native — throws. Guard with {@link isPasskeySupported} first. */
|
|
12
|
+
export declare function runRegistrationCeremony(_optionsJSON: unknown): Promise<unknown>;
|
|
13
|
+
/** Not available on native — throws. Guard with {@link isPasskeySupported} first. */
|
|
14
|
+
export declare function runAuthenticationCeremony(_optionsJSON: unknown): Promise<unknown>;
|
|
15
|
+
//# sourceMappingURL=passkeyClient.native.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"passkeyClient.native.d.ts","sourceRoot":"","sources":["../../../../src/webauthn/passkeyClient.native.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAKH,mEAAmE;AACnE,wBAAgB,kBAAkB,IAAI,OAAO,CAE5C;AAED,qFAAqF;AACrF,wBAAsB,uBAAuB,CAAC,YAAY,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAErF;AAED,qFAAqF;AACrF,wBAAsB,yBAAyB,CAAC,YAAY,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAEvF"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Passkey / WebAuthn ceremony client — WEB implementation.
|
|
3
|
+
*
|
|
4
|
+
* The browser half of the passkey flow: it drives `navigator.credentials`
|
|
5
|
+
* through `@simplewebauthn/browser`, turning the OPAQUE options the server
|
|
6
|
+
* emitted (`OxyServices.webauthn{Register,Login}Options`) into the opaque
|
|
7
|
+
* response the matching `verify` endpoint consumes. Oxy never owns those wire
|
|
8
|
+
* shapes — `@simplewebauthn/browser` does — so options flow in as `unknown` and
|
|
9
|
+
* the single cast at this boundary hands them to the library's own types.
|
|
10
|
+
*
|
|
11
|
+
* This file is selected ONLY on web (react-native-web / Vite RNW): the sibling
|
|
12
|
+
* `passkeyClient.native.ts` + the clean default `passkeyClient.ts` deliberately
|
|
13
|
+
* do NOT import `@simplewebauthn/browser` (a browser-only dependency), per the
|
|
14
|
+
* platform-split rule. Native passkeys are Commons' job — there is no WebAuthn
|
|
15
|
+
* ceremony off the web.
|
|
16
|
+
*/
|
|
17
|
+
import { type RegistrationResponseJSON, type AuthenticationResponseJSON } from '@simplewebauthn/browser';
|
|
18
|
+
/**
|
|
19
|
+
* True iff this browser can run a WebAuthn ceremony (exposes the
|
|
20
|
+
* `PublicKeyCredential` global). Gate all passkey UI/entrypoints on this so an
|
|
21
|
+
* unsupported browser fails loudly rather than throwing mid-ceremony.
|
|
22
|
+
*/
|
|
23
|
+
export declare function isPasskeySupported(): boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Run the WebAuthn REGISTRATION ceremony (`navigator.credentials.create`) from
|
|
26
|
+
* the server's opaque creation options, returning the opaque attestation
|
|
27
|
+
* response for `OxyServices.webauthnRegisterVerify`.
|
|
28
|
+
*/
|
|
29
|
+
export declare function runRegistrationCeremony(optionsJSON: unknown): Promise<RegistrationResponseJSON>;
|
|
30
|
+
/**
|
|
31
|
+
* Run the WebAuthn AUTHENTICATION ceremony (`navigator.credentials.get`) from
|
|
32
|
+
* the server's opaque request options, returning the opaque assertion response
|
|
33
|
+
* for `OxyServices.webauthnLoginVerify`.
|
|
34
|
+
*/
|
|
35
|
+
export declare function runAuthenticationCeremony(optionsJSON: unknown): Promise<AuthenticationResponseJSON>;
|
|
36
|
+
//# sourceMappingURL=passkeyClient.web.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"passkeyClient.web.d.ts","sourceRoot":"","sources":["../../../../src/webauthn/passkeyClient.web.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAKL,KAAK,wBAAwB,EAC7B,KAAK,0BAA0B,EAChC,MAAM,yBAAyB,CAAC;AAEjC;;;;GAIG;AACH,wBAAgB,kBAAkB,IAAI,OAAO,CAE5C;AAED;;;;GAIG;AACH,wBAAsB,uBAAuB,CAC3C,WAAW,EAAE,OAAO,GACnB,OAAO,CAAC,wBAAwB,CAAC,CAEnC;AAED;;;;GAIG;AACH,wBAAsB,yBAAyB,CAC7C,WAAW,EAAE,OAAO,GACnB,OAAO,CAAC,0BAA0B,CAAC,CAErC"}
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
*/
|
|
23
23
|
export { default as OxyProvider } from './ui/components/OxyProvider.js';
|
|
24
24
|
export { useOxy } from './ui/context/OxyContext.js';
|
|
25
|
-
export type { OxyContextState
|
|
25
|
+
export type { OxyContextState } from './ui/context/OxyContext.js';
|
|
26
26
|
export { useAuth } from './ui/hooks/useAuth.js';
|
|
27
27
|
export type { AuthState, AuthActions, UseAuthReturn } from './ui/hooks/useAuth.js';
|
|
28
28
|
export { FontLoader, setupFonts } from './ui/components/FontLoader.js';
|
|
@@ -37,6 +37,7 @@ export type { UseStorageOptions, UseStorageResult } from './ui/hooks/useStorage.
|
|
|
37
37
|
export { useUserProfile, useUserProfiles, useCurrentUser, useUserById, useUserByUsername, useUsersBySessions, usePrivacySettings, useConnectedApps, } from './ui/hooks/queries/useAccountQueries.js';
|
|
38
38
|
export { useSessions, useSession, useDeviceSessions, useUserDevices, useSecurityInfo, useAccountStorageUsage, } from './ui/hooks/queries/useServicesQueries.js';
|
|
39
39
|
export { useSecurityActivity, useRecentSecurityActivity, useInfiniteSecurityActivity, } from './ui/hooks/queries/useSecurityQueries.js';
|
|
40
|
+
export { useAuthMethods } from './ui/hooks/queries/useAuthMethods.js';
|
|
40
41
|
export { useUserSubscription, useUserPayments, useUserWallet, useUserWalletTransactions, } from './ui/hooks/queries/usePaymentQueries.js';
|
|
41
42
|
export type { Subscription, SubscriptionPlan, SubscriptionStatus, SubscriptionFeatures, Payment, Wallet, WalletTransaction, WalletTransactionType, WalletTransactionStatus, WalletPagination, WalletTransactionsResponse, } from './ui/hooks/queries/paymentTypes.js';
|
|
42
43
|
export { useUpdateProfile, useUploadAvatar, useUpdateAccountSettings, useUpdatePrivacySettings, useUpdateNotificationPreferences, useUpdateUserPreferences, useRevokeConnectedApp, useUploadFile, } from './ui/hooks/mutations/useAccountMutations.js';
|
|
@@ -44,7 +45,7 @@ export { useSwitchSession, useLogoutSession, useLogoutAll, useUpdateDeviceName,
|
|
|
44
45
|
export { createProfileMutation, createGenericMutation, } from './ui/hooks/mutations/mutationFactory.js';
|
|
45
46
|
export type { ProfileMutationConfig, GenericMutationConfig, } from './ui/hooks/mutations/mutationFactory.js';
|
|
46
47
|
export { mutationKeys } from './ui/hooks/mutations/mutationKeys.js';
|
|
47
|
-
export { queryKeys, invalidateAccountQueries, invalidateUserQueries, invalidateSessionQueries, invalidateDeviceQueries, invalidatePrivacyQueries, invalidateSecurityQueries, invalidateStorageQueries, invalidatePaymentsQueries, invalidateConnectedAppsQueries, } from './ui/hooks/queries/queryKeys.js';
|
|
48
|
+
export { queryKeys, invalidateAccountQueries, invalidateUserQueries, invalidateSessionQueries, invalidateDeviceQueries, invalidatePrivacyQueries, invalidateSecurityQueries, invalidateStorageQueries, invalidatePaymentsQueries, invalidateConnectedAppsQueries, invalidateAuthMethodsQueries, } from './ui/hooks/queries/queryKeys.js';
|
|
48
49
|
export { useMutationStatus } from './ui/hooks/useMutationStatus.js';
|
|
49
50
|
export type { MutationStatus } from './ui/hooks/useMutationStatus.js';
|
|
50
51
|
export { useOnlineStatus } from './ui/hooks/useOnlineStatus.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAYH,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,gCAA6B,CAAC;AACrE,OAAO,EAAE,MAAM,EAAE,MAAM,4BAAyB,CAAC;AACjD,YAAY,EAAE,eAAe,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAYH,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,gCAA6B,CAAC;AACrE,OAAO,EAAE,MAAM,EAAE,MAAM,4BAAyB,CAAC;AACjD,YAAY,EAAE,eAAe,EAAE,MAAM,4BAAyB,CAAC;AAC/D,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAoB,CAAC;AAC7C,YAAY,EAAE,SAAS,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,uBAAoB,CAAC;AAKhF,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,+BAA4B,CAAC;AAKpE,OAAO,EAAE,YAAY,EAAE,MAAM,0BAAuB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA0B,CAAC;AAC3D,OAAO,EACH,aAAa,EACb,SAAS,IAAI,cAAc,EAC3B,QAAQ,EACR,iBAAiB,EACjB,eA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GlF,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,qCAAkC,CAAC;AAClF,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,sCAAmC,CAAC;AACpF,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,uCAAoC,CAAC;AAKtF,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,uCAAoC,CAAC;AACvF,YAAY,EAAE,SAAS,EAAE,MAAM,2BAAwB,CAAC;AAMxD,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,wBAAwB,GACzB,MAAM,yCAAsC,CAAC"}
|
|
@@ -8,6 +8,12 @@ export interface RunProviderColdBootOptions {
|
|
|
8
8
|
authStore: AuthStateStore;
|
|
9
9
|
clientId?: string;
|
|
10
10
|
authRedirectUri?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Authorize endpoint override for silent cross-origin restore. Defaults to
|
|
13
|
+
* the production Oxy IdP when unset; a local/staging deployment sets it so the
|
|
14
|
+
* silent-restore redirect targets its own IdP, never production.
|
|
15
|
+
*/
|
|
16
|
+
authorizeBaseUrl?: string;
|
|
11
17
|
sessionClient: SessionClient;
|
|
12
18
|
syncDeviceCredentialToHost: () => Promise<void>;
|
|
13
19
|
commitSession: (input: CommitInput, options: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runProviderColdBoot.d.ts","sourceRoot":"","sources":["../../../../../src/ui/boot/runProviderColdBoot.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,cAAc,EACnB,KAAK,WAAW,EACjB,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"runProviderColdBoot.d.ts","sourceRoot":"","sources":["../../../../../src/ui/boot/runProviderColdBoot.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,cAAc,EACnB,KAAK,WAAW,EACjB,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AASjD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA4B,CAAC;AAE9D,iFAAiF;AACjF,eAAO,MAAM,2BAA2B,OAAO,CAAC;AAEhD,MAAM,WAAW,0BAA0B;IACzC,WAAW,EAAE,WAAW,CAAC;IACzB,SAAS,EAAE,cAAc,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,aAAa,EAAE,aAAa,CAAC;IAC7B,0BAA0B,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAChD,aAAa,EAAE,CACb,KAAK,EAAE,WAAW,EAClB,OAAO,EAAE;QAAE,QAAQ,EAAE,OAAO,CAAC;QAAC,OAAO,CAAC,EAAE,OAAO,CAAA;KAAE,KAC9C,OAAO,CAAC,IAAI,CAAC,CAAC;IACnB,gBAAgB,EAAE,MAAM,IAAI,CAAC;IAC7B,aAAa,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;CACzC;AAED;;;;;;;GAOG;AACH,wBAAsB,mBAAmB,CAAC,IAAI,EAAE,0BAA0B,GAAG,OAAO,CAAC,IAAI,CAAC,CA8HzF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OxyAccountDialog.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/OxyAccountDialog.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"OxyAccountDialog.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/OxyAccountDialog.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAgE/B;;;GAGG;AACH,QAAA,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAwJ7B,CAAC;AA0fF,eAAe,gBAAgB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OxyProvider.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/OxyProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmE,KAAK,EAAE,EAAkB,MAAM,OAAO,CAAC;AAIjH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAqB,CAAC;AAqE5D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,QAAA,MAAM,WAAW,EAAE,EAAE,CAAC,gBAAgB,
|
|
1
|
+
{"version":3,"file":"OxyProvider.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/OxyProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmE,KAAK,EAAE,EAAkB,MAAM,OAAO,CAAC;AAIjH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAqB,CAAC;AAqE5D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,QAAA,MAAM,WAAW,EAAE,EAAE,CAAC,gBAAgB,CA2OrC,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
import type { OxyContextState, OxyContextProviderProps } from './oxyContextTypes.js';
|
|
3
|
-
export type { OxyContextState,
|
|
3
|
+
export type { OxyContextState, OxyContextProviderProps } from './oxyContextTypes.js';
|
|
4
4
|
export declare const OxyProvider: React.FC<OxyContextProviderProps>;
|
|
5
5
|
export declare const OxyContextProvider: React.FC<OxyContextProviderProps>;
|
|
6
6
|
export declare const useOxy: () => OxyContextState;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OxyContext.d.ts","sourceRoot":"","sources":["../../../../../src/ui/context/OxyContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"OxyContext.d.ts","sourceRoot":"","sources":["../../../../../src/ui/context/OxyContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AA0D/B,OAAO,KAAK,EACV,eAAe,EACf,uBAAuB,EAExB,MAAM,sBAAmB,CAAC;AAY3B,YAAY,EAAE,eAAe,EAAE,uBAAuB,EAAE,MAAM,sBAAmB,CAAC;AAIlF,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAg5BzD,CAAC;AAEF,eAAO,MAAM,kBAAkB,mCAAc,CAAC;AAmE9C,eAAO,MAAM,MAAM,QAAO,eAMzB,CAAC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
2
|
import type { OxyServices, User, SessionLoginResponse, AccountNode, CreateAccountInput, ClientSession, AccountDialogController, AccountDialogView, ApiError, SessionClient } from '@oxyhq/core';
|
|
3
|
-
import type { SecurityAlert } from '@oxyhq/contracts';
|
|
4
3
|
import type { UseFollowHook } from '../hooks/useFollow.types.js';
|
|
5
4
|
import type { useLanguageManagement } from '../hooks/useLanguageManagement.js';
|
|
6
5
|
import type { RouteName } from '../navigation/routes.js';
|
|
@@ -37,18 +36,43 @@ export interface OxyContextState {
|
|
|
37
36
|
hasIdentity: () => Promise<boolean>;
|
|
38
37
|
getPublicKey: () => Promise<string | null>;
|
|
39
38
|
signIn: (publicKey: string, deviceName?: string) => Promise<User>;
|
|
40
|
-
|
|
39
|
+
/**
|
|
40
|
+
* Sign in with a passkey (WebAuthn). With no `username` this is the
|
|
41
|
+
* usernameless / discoverable-credential flow: the browser prompts for any
|
|
42
|
+
* resident Oxy passkey. Pass `username` for the username-first flow — the
|
|
43
|
+
* server scopes `allowCredentials` to that user's passkeys so a
|
|
44
|
+
* NON-discoverable hardware key (e.g. a U2F/security key) can be used.
|
|
45
|
+
* WEB-ONLY — throws on native or an unsupported browser (native passkeys are
|
|
46
|
+
* Commons' job). On `useOxy()`, NOT re-exposed on `useAuth()`.
|
|
47
|
+
*/
|
|
48
|
+
signInWithPasskey: (opts?: {
|
|
49
|
+
username?: string;
|
|
41
50
|
deviceName?: string;
|
|
42
51
|
deviceFingerprint?: string;
|
|
43
|
-
}) => Promise<
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
52
|
+
}) => Promise<void>;
|
|
53
|
+
/**
|
|
54
|
+
* Create a brand-new account whose first authentication method is a passkey.
|
|
55
|
+
* WEB-ONLY — throws on native or an unsupported browser.
|
|
56
|
+
*/
|
|
57
|
+
registerWithPasskey: (params: {
|
|
58
|
+
username: string;
|
|
59
|
+
deviceName?: string;
|
|
60
|
+
}) => Promise<void>;
|
|
61
|
+
/**
|
|
62
|
+
* Add a passkey to the already-signed-in account (bearer present). Does NOT
|
|
63
|
+
* commit a new session; refreshes the linked auth-methods list on success.
|
|
64
|
+
* WEB-ONLY — throws on native or an unsupported browser.
|
|
65
|
+
*/
|
|
66
|
+
addPasskey: (params?: {
|
|
48
67
|
deviceName?: string;
|
|
49
|
-
}) => Promise<
|
|
50
|
-
|
|
51
|
-
|
|
68
|
+
}) => Promise<void>;
|
|
69
|
+
/**
|
|
70
|
+
* Remove a passkey from the current account by its credential id
|
|
71
|
+
* (`AuthMethodEntry.credentialId`). Refreshes the linked auth-methods list on
|
|
72
|
+
* success. Works on any platform (it is a plain unlink, not a WebAuthn
|
|
73
|
+
* ceremony) but is only reachable from surfaces that list passkeys.
|
|
74
|
+
*/
|
|
75
|
+
removePasskey: (credentialId: string) => Promise<void>;
|
|
52
76
|
revokeSuspiciousSignIn: () => Promise<void>;
|
|
53
77
|
handleWebSession: (session: SessionLoginResponse) => Promise<void>;
|
|
54
78
|
logout: (targetSessionId?: string) => Promise<void>;
|
|
@@ -88,22 +112,19 @@ export interface OxyContextState {
|
|
|
88
112
|
refreshAccounts: () => Promise<void>;
|
|
89
113
|
createAccount: (data: CreateAccountInput) => Promise<AccountNode>;
|
|
90
114
|
}
|
|
91
|
-
/**
|
|
92
|
-
* Result of {@link OxyContextState.signInWithPassword}.
|
|
93
|
-
*/
|
|
94
|
-
export type PasswordSignInResult = {
|
|
95
|
-
status: 'ok';
|
|
96
|
-
securityAlert?: SecurityAlert;
|
|
97
|
-
} | {
|
|
98
|
-
status: '2fa_required';
|
|
99
|
-
loginToken: string;
|
|
100
|
-
};
|
|
101
115
|
export interface OxyContextProviderProps {
|
|
102
116
|
children: ReactNode;
|
|
103
117
|
oxyServices?: OxyServices;
|
|
104
118
|
baseURL?: string;
|
|
105
119
|
authWebUrl?: string;
|
|
106
120
|
authRedirectUri?: string;
|
|
121
|
+
/**
|
|
122
|
+
* Authorize endpoint override for silent cross-origin session restore
|
|
123
|
+
* (web cross-app SSO). Defaults to the production Oxy IdP when unset; a
|
|
124
|
+
* local/staging deployment points it at its own IdP so cold boot never
|
|
125
|
+
* bounces the tab to production `auth.oxy.so`.
|
|
126
|
+
*/
|
|
127
|
+
authorizeBaseUrl?: string;
|
|
107
128
|
storageKeyPrefix?: string;
|
|
108
129
|
clientId?: string;
|
|
109
130
|
/** Sync device credentials to auth.oxy.so after interactive sign-in. @default true */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oxyContextTypes.d.ts","sourceRoot":"","sources":["../../../../../src/ui/context/oxyContextTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,oBAAoB,EAAE,WAAW,EAAE,kBAAkB,EAAE,aAAa,EAAE,uBAAuB,EAAE,iBAAiB,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAChM,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM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