@oxyhq/services 21.0.1 → 22.1.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 +12 -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 +27 -546
- package/lib/commonjs/ui/components/OxyAccountDialog.js.map +1 -1
- package/lib/commonjs/ui/components/OxyAuthChooser.js +881 -0
- package/lib/commonjs/ui/components/OxyAuthChooser.js.map +1 -0
- package/lib/commonjs/ui/components/OxyProvider.js +2 -0
- package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
- package/lib/commonjs/ui/components/oxyAuthChooserStyles.js +158 -0
- package/lib/commonjs/ui/components/oxyAuthChooserStyles.js.map +1 -0
- package/lib/commonjs/ui/context/OxyContext.js +50 -72
- package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
- package/lib/commonjs/ui/context/passkeyFlow.js +9 -8
- package/lib/commonjs/ui/context/passkeyFlow.js.map +1 -1
- package/lib/commonjs/ui/context/useOxyAccountGraph.js +6 -2
- package/lib/commonjs/ui/context/useOxyAccountGraph.js.map +1 -1
- package/lib/commonjs/ui/hooks/useSwitchableAccounts.js +2 -1
- package/lib/commonjs/ui/hooks/useSwitchableAccounts.js.map +1 -1
- package/lib/commonjs/ui/utils/commonsStoreLinks.js +42 -0
- package/lib/commonjs/ui/utils/commonsStoreLinks.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/module/index.js +5 -0
- 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 +29 -550
- package/lib/module/ui/components/OxyAccountDialog.js.map +1 -1
- package/lib/module/ui/components/OxyAuthChooser.js +878 -0
- package/lib/module/ui/components/OxyAuthChooser.js.map +1 -0
- package/lib/module/ui/components/OxyProvider.js +2 -0
- package/lib/module/ui/components/OxyProvider.js.map +1 -1
- package/lib/module/ui/components/oxyAuthChooserStyles.js +155 -0
- package/lib/module/ui/components/oxyAuthChooserStyles.js.map +1 -0
- package/lib/module/ui/context/OxyContext.js +50 -72
- package/lib/module/ui/context/OxyContext.js.map +1 -1
- package/lib/module/ui/context/passkeyFlow.js +9 -8
- package/lib/module/ui/context/passkeyFlow.js.map +1 -1
- package/lib/module/ui/context/useOxyAccountGraph.js +6 -2
- package/lib/module/ui/context/useOxyAccountGraph.js.map +1 -1
- package/lib/module/ui/hooks/useSwitchableAccounts.js +2 -1
- package/lib/module/ui/hooks/useSwitchableAccounts.js.map +1 -1
- package/lib/module/ui/utils/commonsStoreLinks.js +37 -0
- package/lib/module/ui/utils/commonsStoreLinks.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/typescript/commonjs/index.d.ts +3 -1
- 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 +10 -20
- package/lib/typescript/commonjs/ui/components/OxyAccountDialog.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/OxyAuthChooser.d.ts +60 -0
- package/lib/typescript/commonjs/ui/components/OxyAuthChooser.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/oxyAuthChooserStyles.d.ts +148 -0
- package/lib/typescript/commonjs/ui/components/oxyAuthChooserStyles.d.ts.map +1 -0
- 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 +22 -27
- package/lib/typescript/commonjs/ui/context/oxyContextTypes.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/passkeyFlow.d.ts +15 -4
- package/lib/typescript/commonjs/ui/context/passkeyFlow.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/useOxyAccountGraph.d.ts +1 -0
- package/lib/typescript/commonjs/ui/context/useOxyAccountGraph.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useSwitchableAccounts.d.ts.map +1 -1
- 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/commonsStoreLinks.d.ts +24 -0
- package/lib/typescript/commonjs/ui/utils/commonsStoreLinks.d.ts.map +1 -0
- 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/module/index.d.ts +3 -1
- 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 +10 -20
- package/lib/typescript/module/ui/components/OxyAccountDialog.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/OxyAuthChooser.d.ts +60 -0
- package/lib/typescript/module/ui/components/OxyAuthChooser.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/oxyAuthChooserStyles.d.ts +148 -0
- package/lib/typescript/module/ui/components/oxyAuthChooserStyles.d.ts.map +1 -0
- 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 +22 -27
- package/lib/typescript/module/ui/context/oxyContextTypes.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/passkeyFlow.d.ts +15 -4
- package/lib/typescript/module/ui/context/passkeyFlow.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/useOxyAccountGraph.d.ts +1 -0
- package/lib/typescript/module/ui/context/useOxyAccountGraph.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useSwitchableAccounts.d.ts.map +1 -1
- 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/commonsStoreLinks.d.ts +24 -0
- package/lib/typescript/module/ui/utils/commonsStoreLinks.d.ts.map +1 -0
- package/lib/typescript/module/ui/utils/crossOriginRestore.d.ts +19 -0
- package/lib/typescript/module/ui/utils/crossOriginRestore.d.ts.map +1 -1
- package/package.json +5 -5
- package/src/index.ts +8 -1
- package/src/ui/boot/runProviderColdBoot.ts +24 -1
- package/src/ui/components/OxyAccountDialog.tsx +33 -571
- package/src/ui/components/OxyAuthChooser.tsx +883 -0
- package/src/ui/components/OxyProvider.tsx +2 -0
- package/src/ui/components/oxyAuthChooserStyles.ts +152 -0
- package/src/ui/context/OxyContext.tsx +56 -82
- package/src/ui/context/__tests__/passkeyFlow.test.ts +22 -15
- package/src/ui/context/oxyContextTypes.ts +27 -26
- package/src/ui/context/passkeyFlow.ts +17 -9
- package/src/ui/context/useOxyAccountGraph.ts +4 -2
- package/src/ui/hooks/useSwitchableAccounts.ts +1 -0
- package/src/ui/types/navigation.ts +8 -0
- package/src/ui/utils/__tests__/crossOriginRestore.test.ts +143 -0
- package/src/ui/utils/commonsStoreLinks.ts +38 -0
- package/src/ui/utils/crossOriginRestore.ts +34 -0
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared styles for `OxyAuthChooser`'s views. Extracted from `OxyAccountDialog`
|
|
3
|
+
* so both the Dialog-wrapped host and any bare host (e.g. a future
|
|
4
|
+
* auth.oxy.so hub page) render identically without duplicating a StyleSheet.
|
|
5
|
+
*/
|
|
6
|
+
export declare const authChooserStyles: {
|
|
7
|
+
rows: {
|
|
8
|
+
width: "100%";
|
|
9
|
+
gap: number;
|
|
10
|
+
};
|
|
11
|
+
accountRow: {
|
|
12
|
+
flexDirection: "row";
|
|
13
|
+
alignItems: "center";
|
|
14
|
+
gap: number;
|
|
15
|
+
borderWidth: number;
|
|
16
|
+
borderRadius: number;
|
|
17
|
+
paddingVertical: number;
|
|
18
|
+
paddingHorizontal: number;
|
|
19
|
+
};
|
|
20
|
+
rowDisabled: {
|
|
21
|
+
opacity: number;
|
|
22
|
+
};
|
|
23
|
+
avatarRing: {
|
|
24
|
+
borderRadius: number;
|
|
25
|
+
borderWidth: number;
|
|
26
|
+
padding: number;
|
|
27
|
+
};
|
|
28
|
+
rowMeta: {
|
|
29
|
+
flex: number;
|
|
30
|
+
minWidth: number;
|
|
31
|
+
};
|
|
32
|
+
rowName: {
|
|
33
|
+
fontSize: number;
|
|
34
|
+
fontWeight: "600";
|
|
35
|
+
};
|
|
36
|
+
rowHandle: {
|
|
37
|
+
fontSize: number;
|
|
38
|
+
marginTop: number;
|
|
39
|
+
};
|
|
40
|
+
addRow: {
|
|
41
|
+
flexDirection: "row";
|
|
42
|
+
alignItems: "center";
|
|
43
|
+
gap: number;
|
|
44
|
+
borderWidth: number;
|
|
45
|
+
borderStyle: "dashed";
|
|
46
|
+
borderRadius: number;
|
|
47
|
+
paddingVertical: number;
|
|
48
|
+
paddingHorizontal: number;
|
|
49
|
+
marginTop: number;
|
|
50
|
+
};
|
|
51
|
+
addBadge: {
|
|
52
|
+
width: number;
|
|
53
|
+
height: number;
|
|
54
|
+
borderRadius: number;
|
|
55
|
+
borderWidth: number;
|
|
56
|
+
alignItems: "center";
|
|
57
|
+
justifyContent: "center";
|
|
58
|
+
};
|
|
59
|
+
footerLinks: {
|
|
60
|
+
alignItems: "center";
|
|
61
|
+
marginTop: number;
|
|
62
|
+
};
|
|
63
|
+
footerLink: {
|
|
64
|
+
alignSelf: "center";
|
|
65
|
+
paddingVertical: number;
|
|
66
|
+
marginTop: number;
|
|
67
|
+
};
|
|
68
|
+
linkText: {
|
|
69
|
+
fontSize: number;
|
|
70
|
+
fontWeight: "600";
|
|
71
|
+
};
|
|
72
|
+
signInBlock: {
|
|
73
|
+
width: "100%";
|
|
74
|
+
};
|
|
75
|
+
primaryButton: {
|
|
76
|
+
width: "100%";
|
|
77
|
+
borderRadius: number;
|
|
78
|
+
marginTop: number;
|
|
79
|
+
};
|
|
80
|
+
secondaryButton: {
|
|
81
|
+
width: "100%";
|
|
82
|
+
borderRadius: number;
|
|
83
|
+
marginTop: number;
|
|
84
|
+
};
|
|
85
|
+
usernameInput: {
|
|
86
|
+
width: "100%";
|
|
87
|
+
borderWidth: number;
|
|
88
|
+
borderRadius: number;
|
|
89
|
+
paddingVertical: number;
|
|
90
|
+
paddingHorizontal: number;
|
|
91
|
+
fontSize: number;
|
|
92
|
+
marginTop: number;
|
|
93
|
+
};
|
|
94
|
+
dividerRow: {
|
|
95
|
+
flexDirection: "row";
|
|
96
|
+
alignItems: "center";
|
|
97
|
+
width: "100%";
|
|
98
|
+
marginVertical: number;
|
|
99
|
+
};
|
|
100
|
+
dividerLine: {
|
|
101
|
+
flex: number;
|
|
102
|
+
height: number;
|
|
103
|
+
};
|
|
104
|
+
dividerText: {
|
|
105
|
+
marginHorizontal: number;
|
|
106
|
+
fontSize: number;
|
|
107
|
+
};
|
|
108
|
+
centeredBlock: {
|
|
109
|
+
alignItems: "center";
|
|
110
|
+
justifyContent: "center";
|
|
111
|
+
gap: number;
|
|
112
|
+
paddingVertical: number;
|
|
113
|
+
};
|
|
114
|
+
mutedText: {
|
|
115
|
+
fontSize: number;
|
|
116
|
+
textAlign: "center";
|
|
117
|
+
};
|
|
118
|
+
qrHeadline: {
|
|
119
|
+
fontSize: number;
|
|
120
|
+
fontWeight: "700";
|
|
121
|
+
textAlign: "center";
|
|
122
|
+
};
|
|
123
|
+
errorText: {
|
|
124
|
+
fontSize: number;
|
|
125
|
+
textAlign: "center";
|
|
126
|
+
};
|
|
127
|
+
errorBanner: {
|
|
128
|
+
flexDirection: "row";
|
|
129
|
+
alignItems: "center";
|
|
130
|
+
gap: number;
|
|
131
|
+
width: "100%";
|
|
132
|
+
borderRadius: number;
|
|
133
|
+
paddingVertical: number;
|
|
134
|
+
paddingHorizontal: number;
|
|
135
|
+
marginBottom: number;
|
|
136
|
+
};
|
|
137
|
+
errorBannerText: {
|
|
138
|
+
flex: number;
|
|
139
|
+
fontSize: number;
|
|
140
|
+
lineHeight: number;
|
|
141
|
+
};
|
|
142
|
+
qrPlate: {
|
|
143
|
+
padding: number;
|
|
144
|
+
borderRadius: number;
|
|
145
|
+
backgroundColor: string;
|
|
146
|
+
};
|
|
147
|
+
};
|
|
148
|
+
//# sourceMappingURL=oxyAuthChooserStyles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oxyAuthChooserStyles.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/oxyAuthChooserStyles.ts"],"names":[],"mappings":"AAKA;;;;GAIG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6I5B,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
import type { OxyContextState, OxyContextProviderProps } from './oxyContextTypes';
|
|
3
|
-
export type { OxyContextState,
|
|
3
|
+
export type { OxyContextState, OxyContextProviderProps } from './oxyContextTypes';
|
|
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,mBAAmB,CAAC;AAY3B,YAAY,EAAE,eAAe,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAIlF,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CA46BzD,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';
|
|
5
4
|
import type { useLanguageManagement } from '../hooks/useLanguageManagement';
|
|
6
5
|
import type { RouteName } from '../navigation/routes';
|
|
@@ -37,25 +36,17 @@ export interface OxyContextState {
|
|
|
37
36
|
hasIdentity: () => Promise<boolean>;
|
|
38
37
|
getPublicKey: () => Promise<string | null>;
|
|
39
38
|
signIn: (publicKey: string, deviceName?: string) => Promise<User>;
|
|
40
|
-
signInWithPassword: (identifier: string, password: string, opts?: {
|
|
41
|
-
deviceName?: string;
|
|
42
|
-
deviceFingerprint?: string;
|
|
43
|
-
}) => Promise<PasswordSignInResult>;
|
|
44
|
-
completeTwoFactorSignIn: (params: {
|
|
45
|
-
loginToken: string;
|
|
46
|
-
token?: string;
|
|
47
|
-
backupCode?: string;
|
|
48
|
-
deviceName?: string;
|
|
49
|
-
}) => Promise<{
|
|
50
|
-
securityAlert?: SecurityAlert;
|
|
51
|
-
}>;
|
|
52
39
|
/**
|
|
53
|
-
* Sign in with a passkey (WebAuthn).
|
|
54
|
-
* flow: the browser prompts for any
|
|
55
|
-
*
|
|
56
|
-
* `
|
|
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()`.
|
|
57
47
|
*/
|
|
58
48
|
signInWithPasskey: (opts?: {
|
|
49
|
+
username?: string;
|
|
59
50
|
deviceName?: string;
|
|
60
51
|
deviceFingerprint?: string;
|
|
61
52
|
}) => Promise<void>;
|
|
@@ -75,6 +66,13 @@ export interface OxyContextState {
|
|
|
75
66
|
addPasskey: (params?: {
|
|
76
67
|
deviceName?: string;
|
|
77
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>;
|
|
78
76
|
revokeSuspiciousSignIn: () => Promise<void>;
|
|
79
77
|
handleWebSession: (session: SessionLoginResponse) => Promise<void>;
|
|
80
78
|
logout: (targetSessionId?: string) => Promise<void>;
|
|
@@ -114,22 +112,19 @@ export interface OxyContextState {
|
|
|
114
112
|
refreshAccounts: () => Promise<void>;
|
|
115
113
|
createAccount: (data: CreateAccountInput) => Promise<AccountNode>;
|
|
116
114
|
}
|
|
117
|
-
/**
|
|
118
|
-
* Result of {@link OxyContextState.signInWithPassword}.
|
|
119
|
-
*/
|
|
120
|
-
export type PasswordSignInResult = {
|
|
121
|
-
status: 'ok';
|
|
122
|
-
securityAlert?: SecurityAlert;
|
|
123
|
-
} | {
|
|
124
|
-
status: '2fa_required';
|
|
125
|
-
loginToken: string;
|
|
126
|
-
};
|
|
127
115
|
export interface OxyContextProviderProps {
|
|
128
116
|
children: ReactNode;
|
|
129
117
|
oxyServices?: OxyServices;
|
|
130
118
|
baseURL?: string;
|
|
131
119
|
authWebUrl?: string;
|
|
132
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;
|
|
133
128
|
storageKeyPrefix?: string;
|
|
134
129
|
clientId?: string;
|
|
135
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,iB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AAQ,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAC3D"}
|
|
@@ -27,7 +27,7 @@ export declare const PASSKEY_UNSUPPORTED_MESSAGE = "Passkeys are not available i
|
|
|
27
27
|
/** Injected dependencies for {@link runPasskeyLogin}. */
|
|
28
28
|
export interface RunPasskeyLoginDeps {
|
|
29
29
|
isSupported: () => boolean;
|
|
30
|
-
getLoginOptions: () => Promise<unknown>;
|
|
30
|
+
getLoginOptions: (username?: string) => Promise<unknown>;
|
|
31
31
|
runCeremony: (optionsJSON: unknown) => Promise<unknown>;
|
|
32
32
|
loginVerify: (response: unknown, envelope: {
|
|
33
33
|
deviceName?: string;
|
|
@@ -35,14 +35,25 @@ export interface RunPasskeyLoginDeps {
|
|
|
35
35
|
deviceId?: string;
|
|
36
36
|
}) => Promise<LoginResult>;
|
|
37
37
|
commit: (input: CommitInput) => Promise<void>;
|
|
38
|
+
/**
|
|
39
|
+
* When present, scopes login options to that user's registered passkeys
|
|
40
|
+
* (username-first) — the path a NON-discoverable hardware key (e.g. a U2F
|
|
41
|
+
* security key) needs, since it can't be found by a usernameless ceremony.
|
|
42
|
+
* Omit for the discoverable / resident-credential path.
|
|
43
|
+
*/
|
|
44
|
+
username?: string;
|
|
38
45
|
deviceId?: string;
|
|
39
46
|
deviceName?: string;
|
|
40
47
|
deviceFingerprint?: string;
|
|
41
48
|
}
|
|
42
49
|
/**
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
50
|
+
* Passkey SIGN-IN. With no `username` this is the usernameless
|
|
51
|
+
* (discoverable-credential) flow; with a `username` it is username-first —
|
|
52
|
+
* the server scopes `allowCredentials` to that user's passkeys so a
|
|
53
|
+
* non-discoverable hardware key (U2F/security key) can be selected. Either way:
|
|
54
|
+
* request login options, run the authentication ceremony, verify, then commit
|
|
55
|
+
* the session. A passkey assertion is itself the strong factor — sign-in always
|
|
56
|
+
* resolves to a completed session.
|
|
46
57
|
*/
|
|
47
58
|
export declare function runPasskeyLogin(deps: RunPasskeyLoginDeps): Promise<void>;
|
|
48
59
|
/** Injected dependencies for {@link runPasskeyRegister}. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"passkeyFlow.d.ts","sourceRoot":"","sources":["../../../../../src/ui/context/passkeyFlow.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAsB,MAAM,kBAAkB,CAAC;AACxE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD;;;;GAIG;AACH,MAAM,MAAM,2BAA2B,GAAG;IAAE,OAAO,EAAE,IAAI,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAAG,WAAW,CAAC;AAE3F,qFAAqF;AACrF,eAAO,MAAM,2BAA2B,gFACuC,CAAC;AAehF,yDAAyD;AACzD,MAAM,WAAW,mBAAmB;IAClC,WAAW,EAAE,MAAM,OAAO,CAAC;IAC3B,eAAe,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"passkeyFlow.d.ts","sourceRoot":"","sources":["../../../../../src/ui/context/passkeyFlow.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAsB,MAAM,kBAAkB,CAAC;AACxE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD;;;;GAIG;AACH,MAAM,MAAM,2BAA2B,GAAG;IAAE,OAAO,EAAE,IAAI,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAAG,WAAW,CAAC;AAE3F,qFAAqF;AACrF,eAAO,MAAM,2BAA2B,gFACuC,CAAC;AAehF,yDAAyD;AACzD,MAAM,WAAW,mBAAmB;IAClC,WAAW,EAAE,MAAM,OAAO,CAAC;IAC3B,eAAe,EAAE,CAAC,QAAQ,CAAC,E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,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;GAIG;AACH,wBAAsB,kBAAkB,CAAC,IAAI,EAAE,sBAAsB,GAAG,OAAO,CAAC,IAAI,CAAC,CAgBpF;AAED,uDAAuD;AACvD,MAAM,WAAW,iBAAiB;IAChC,WAAW,EAAE,MAAM,OAAO,CAAC;IAC3B,kBAAkB,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;IAC3C,WAAW,EAAE,CAAC,WAAW,EAAE,OAAO,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IACxD,cAAc,EAAE,CACd,QAAQ,EAAE,OAAO,EACjB,QAAQ,EAAE;QAAE,UAAU,CAAC,EAAE,MAAM,CAAA;KAAE,KAC9B,OAAO,CAAC,2BAA2B,CAAC,CAAC;IAC1C,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;;GAKG;AACH,wBAAsB,aAAa,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CAW1E"}
|
|
@@ -11,6 +11,7 @@ interface UseOxyAccountGraphParams {
|
|
|
11
11
|
syncFromClient: () => Promise<void>;
|
|
12
12
|
commitSession: (input: CommitInput, options: {
|
|
13
13
|
activate: boolean;
|
|
14
|
+
hubSync?: boolean;
|
|
14
15
|
}) => Promise<void>;
|
|
15
16
|
queryClient: QueryClient;
|
|
16
17
|
accountDialogControllerRef: RefObject<AccountDialogController | null>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useOxyAccountGraph.d.ts","sourceRoot":"","sources":["../../../../../src/ui/context/useOxyAccountGraph.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACzE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,kBAAkB,EAAE,uBA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AAC;IACxG,WAAW,EAAE,WAAW,CAAC;IACzB,0BAA0B,EAAE,SAAS,CAAC,uBAAuB,GAAG,IAAI,CAAC,CAAC;IACtE,oBAAoB,EAAE,SAAS,CAAC,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;CACtD;AAED,wBAAgB,kBAAkB,CAAC,EACjC,eAAe,EACf,UAAU,EACV,WAAW,EACX,WAAW,EACX,aAAa,EACb,cAAc,EACd,aAAa,EACb,WAAW,EACX,0BAA0B,EAC1B,oBAAoB,GACrB,EAAE,wBAAwB;;2BAGqB,OAAO,CAAC,IAAI,CAAC;iCAiCvC,MAAM,KAAG,OAAO,CAAC,IAAI,CAAC;0BAiC3B,kBAAkB,KAAG,OAAO,CAAC,WAAW,CAAC;EAczD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSwitchableAccounts.d.ts","sourceRoot":"","sources":["../../../../../src/ui/hooks/useSwitchableAccounts.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAyB,MAAM,aAAa,CAAC;AAG5E,MAAM,WAAW,2BAA2B;IACxC,0EAA0E;IAC1E,QAAQ,EAAE,iBAAiB,EAAE,CAAC;IAC9B,0EAA0E;IAC1E,SAAS,EAAE,OAAO,CAAC;IACnB,mEAAmE;IACnE,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;CACnC;
|
|
1
|
+
{"version":3,"file":"useSwitchableAccounts.d.ts","sourceRoot":"","sources":["../../../../../src/ui/hooks/useSwitchableAccounts.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAyB,MAAM,aAAa,CAAC;AAG5E,MAAM,WAAW,2BAA2B;IACxC,0EAA0E;IAC1E,QAAQ,EAAE,iBAAiB,EAAE,CAAC;IAC9B,0EAA0E;IAC1E,SAAS,EAAE,OAAO,CAAC;IACnB,mEAAmE;IACnE,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;CACnC;AAiBD;;;;;;;;;;;GAWG;AACH,wBAAgB,qBAAqB,IAAI,2BAA2B,CAuBnE"}
|
|
@@ -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,IAAI,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AAE,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"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Where to send a user who doesn't have Commons installed yet.
|
|
3
|
+
*
|
|
4
|
+
* Commons is not published to either app store as of this writing (no submit
|
|
5
|
+
* profile in its `eas.json`, no store listing) — so these are ALWAYS
|
|
6
|
+
* env-overridable and NEVER hardcoded, and the landing-page fallback exists
|
|
7
|
+
* precisely so a "Get Commons" affordance is never a dead link in the
|
|
8
|
+
* meantime. Once Commons ships to TestFlight/Play, set the two store env vars
|
|
9
|
+
* and every consumer picks them up with no code change.
|
|
10
|
+
*/
|
|
11
|
+
/** Real per-platform store URLs, or `undefined` where not yet configured. */
|
|
12
|
+
export interface CommonsStoreLinks {
|
|
13
|
+
ios: string | undefined;
|
|
14
|
+
android: string | undefined;
|
|
15
|
+
}
|
|
16
|
+
/** Per-platform Commons store URLs, from env — `undefined` when unset. */
|
|
17
|
+
export declare function getCommonsStoreLinks(): CommonsStoreLinks;
|
|
18
|
+
/**
|
|
19
|
+
* Resolve the "Get Commons" href for the current platform. Never `undefined`
|
|
20
|
+
* — falls back to a landing page so the affordance is always a working link,
|
|
21
|
+
* store listing or not.
|
|
22
|
+
*/
|
|
23
|
+
export declare function getCommonsAcquisitionUrl(platformOS: 'ios' | 'android' | string): string;
|
|
24
|
+
//# sourceMappingURL=commonsStoreLinks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commonsStoreLinks.d.ts","sourceRoot":"","sources":["../../../../../src/ui/utils/commonsStoreLinks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,6EAA6E;AAC7E,MAAM,WAAW,iBAAiB;IAChC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAC;IACxB,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;CAC7B;AAED,0EAA0E;AAC1E,wBAAgB,oBAAoB,IAAI,iBAAiB,CAKxD;AAKD;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,UAAU,EAAE,KAAK,GAAG,SAAS,GAAG,MAAM,GAAG,MAAM,CAIvF"}
|
|
@@ -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"}
|
|
@@ -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';
|
|
@@ -72,6 +72,8 @@ export { LogoIcon } from './ui/components/logo/LogoIcon.js';
|
|
|
72
72
|
export { LogoText } from './ui/components/logo/LogoText.js';
|
|
73
73
|
export { default as ProfileButton } from './ui/components/ProfileButton.js';
|
|
74
74
|
export type { ProfileButtonProps } from './ui/components/ProfileButton.js';
|
|
75
|
+
export { default as OxyAuthChooser } from './ui/components/OxyAuthChooser.js';
|
|
76
|
+
export type { OxyAuthChooserProps } from './ui/components/OxyAuthChooser.js';
|
|
75
77
|
export { useSwitchableAccounts } from './ui/hooks/useSwitchableAccounts.js';
|
|
76
78
|
export type { UseSwitchableAccountsResult } from './ui/hooks/useSwitchableAccounts.js';
|
|
77
79
|
export { default as ProfileScreen } from './ui/screens/ProfileScreen.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,eAAe,EACf,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,kBAAkB,EAClB,gBAAgB,GACnB,MAAM,2BAAwB,CAAC;AAKhC,OAAO,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,yBAAsB,CAAC;AACtE,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAA+B,CAAC;AACnE,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,yBAAsB,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,0BAAuB,CAAC;AACn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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,24 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* OxyAccountDialog — the ONE unified account dialog for `@oxyhq/services`.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* (the uniform switch), the active row is flagged, and a "+ Add account" row
|
|
12
|
-
* opens the sign-in entry. This is what `ProfileButton` opens.
|
|
13
|
-
* - `add` / `signin` — the sign-in entry: primary "Sign in with Oxy" (device
|
|
14
|
-
* flow), "Scan a QR", and a secondary "Use a password" hand-off that opens
|
|
15
|
-
* auth.oxy.so (password + 2FA are NOT in the SDK).
|
|
16
|
-
* - `qr` — the cross-device QR handoff + its waiting state.
|
|
17
|
-
*
|
|
18
|
-
* Per-account color re-theming uses Bloom's `APP_COLOR_PRESETS` + `BloomColorScope`
|
|
19
|
-
* (same visual language auth.oxy.so uses). Base theming is `useTheme()` + a
|
|
20
|
-
* `StyleSheet`, so the dialog renders correctly in EVERY consumer — including apps
|
|
21
|
-
* that do not use NativeWind (e.g. the accounts app).
|
|
4
|
+
* Bloom `<Dialog>` chrome (header, back button, placement, scroll body) around
|
|
5
|
+
* the headless chooser logic, which lives in `OxyAuthChooser` — the account
|
|
6
|
+
* switcher, sign-in, sign-up, and QR views are ALL there, extracted so the
|
|
7
|
+
* same chooser can be mounted bare by a future host with no Dialog chrome
|
|
8
|
+
* (e.g. an auth.oxy.so hub page driving the cross-origin passkey popup, b2).
|
|
9
|
+
* This file owns ONLY the chrome: the title/subtitle per view, the back
|
|
10
|
+
* button, and the Bloom `<Dialog>` surface itself.
|
|
22
11
|
*
|
|
23
12
|
* The surface is Bloom's `<Dialog>` (`@oxyhq/bloom/dialog`) with a responsive
|
|
24
13
|
* `placement` — a bottom sheet on narrow viewports, a centered card on wide ones.
|
|
@@ -34,8 +23,9 @@
|
|
|
34
23
|
* Backdrop / swipe-to-dismiss is disabled (`dismissOnBackdrop={false}`) on purpose:
|
|
35
24
|
* Bloom's controlled `bottom` placement does not fire `onClose` on a gesture or
|
|
36
25
|
* backdrop dismissal, so allowing it would desync `isAccountDialogOpen` from the
|
|
37
|
-
* sheet and block reopening. The header close button (and
|
|
38
|
-
* drive `closeAccountDialog`, which flips `open` and runs the exit
|
|
26
|
+
* sheet and block reopening. The header close button (and `OxyAuthChooser`'s
|
|
27
|
+
* `onComplete`) drive `closeAccountDialog`, which flips `open` and runs the exit
|
|
28
|
+
* animation.
|
|
39
29
|
*/
|
|
40
30
|
import type React from 'react';
|
|
41
31
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OxyAccountDialog.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/OxyAccountDialog.tsx"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"OxyAccountDialog.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/OxyAccountDialog.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAgB/B;;;GAGG;AACH,QAAA,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAgD7B,CAAC;AAgJF,eAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OxyAuthChooser — the account switcher + sign-in/sign-up surface, WITHOUT
|
|
3
|
+
* any dialog chrome.
|
|
4
|
+
*
|
|
5
|
+
* A thin React Native binding over the headless `AccountDialogController` in
|
|
6
|
+
* `@oxyhq/core` (bound via `useSyncExternalStore`) — the same data/state
|
|
7
|
+
* machine {@link OxyAccountDialog} renders, extracted so it can be mounted in
|
|
8
|
+
* TWO places: wrapped in Bloom's `<Dialog>` by `OxyAccountDialog` (the normal
|
|
9
|
+
* in-app surface), and mounted bare by a future auth.oxy.so hub page for the
|
|
10
|
+
* cross-origin passkey popup (b2) — same chooser, two hosts, two completion
|
|
11
|
+
* strategies via the `onComplete` prop. Neither host duplicates view logic.
|
|
12
|
+
*
|
|
13
|
+
* Views (from `snapshot.view`):
|
|
14
|
+
* - `accounts` — the unified `SwitchableAccount[]` list. Tapping a row
|
|
15
|
+
* switches through `controller.switchTo(accountId)`, the active row is
|
|
16
|
+
* flagged, and a "+ Add account" row opens the sign-in entry.
|
|
17
|
+
* - `add` / `signin` — the sign-in entry. On WEB this auto-starts "Sign in
|
|
18
|
+
* with Oxy" (native shared-keychain silently, else the QR handoff) the
|
|
19
|
+
* instant the view is entered — the QR is the PRIMARY web surface, not a
|
|
20
|
+
* button behind a click. On NATIVE it stays button-driven (unchanged):
|
|
21
|
+
* primary "Sign in with Oxy", secondary "Scan a QR from another device".
|
|
22
|
+
* Both platforms get a footer entry into `signup`.
|
|
23
|
+
* - `signup` — account creation. Commons is ALWAYS the priority path (owner
|
|
24
|
+
* mandate) and leads everywhere it appears: native shows only "Create your
|
|
25
|
+
* identity in Commons" (or "Get Commons" first, if not installed); web on
|
|
26
|
+
* a first-party Oxy origin leads with the SAME "Get Commons" CTA, with
|
|
27
|
+
* inline passkey creation (username + `registerWithPasskey`) offered
|
|
28
|
+
* UNDERNEATH as the de-emphasized "don't want to install anything"
|
|
29
|
+
* alternative — never co-equal, never a competing button. Anywhere else (a
|
|
30
|
+
* non-Oxy web origin, before the b2 hub-relay ships) shows an honest "not
|
|
31
|
+
* available here yet" message instead of a broken button.
|
|
32
|
+
* - `qr` — the cross-device Commons handoff, and the PRIMARY web sign-in
|
|
33
|
+
* surface. On a first-party Oxy origin this ALSO carries a "No Commons?"
|
|
34
|
+
* passkey link — identity is ONE thing (Commons key or browser passkey,
|
|
35
|
+
* same Oxy ID), so there is no separate "sign in with a passkey" button
|
|
36
|
+
* anywhere in this file, but passkey is explicitly the LIGHTWEIGHT
|
|
37
|
+
* ALTERNATIVE for someone who doesn't want to install Commons, never
|
|
38
|
+
* co-equal: same small-text-link subordination, same framing, wherever it
|
|
39
|
+
* appears. Native additionally branches on `commonsAvailability`: when
|
|
40
|
+
* Commons isn't installed, this leads with a "Get Commons" CTA instead of
|
|
41
|
+
* a same-device dead-end QR.
|
|
42
|
+
*
|
|
43
|
+
* Per-account color re-theming uses Bloom's `APP_COLOR_PRESETS` + `BloomColorScope`
|
|
44
|
+
* (same visual language auth.oxy.so uses). Base theming is `useTheme()` + a
|
|
45
|
+
* `StyleSheet`, so this renders correctly in EVERY consumer — including apps
|
|
46
|
+
* that do not use NativeWind (e.g. the accounts app).
|
|
47
|
+
*/
|
|
48
|
+
import type React from 'react';
|
|
49
|
+
export interface OxyAuthChooserProps {
|
|
50
|
+
/** Called after a completed switch, sign-in, or sign-up. */
|
|
51
|
+
onComplete?: () => void;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* The account switcher + sign-in/sign-up chooser. Mounted by `OxyAccountDialog`
|
|
55
|
+
* (wrapped in Bloom's `<Dialog>`) today; mountable bare by any future host that
|
|
56
|
+
* supplies its own `onComplete`.
|
|
57
|
+
*/
|
|
58
|
+
declare const OxyAuthChooser: React.FC<OxyAuthChooserProps>;
|
|
59
|
+
export default OxyAuthChooser;
|
|
60
|
+
//# sourceMappingURL=OxyAuthChooser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OxyAuthChooser.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/OxyAuthChooser.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAyC/B,MAAM,WAAW,mBAAmB;IAClC,4DAA4D;IAC5D,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;CACzB;AA8BD;;;;GAIG;AACH,QAAA,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAwLjD,CAAC;AA2jBF,eAAe,cAAc,CAAC"}
|