@oxy.so/services 15.0.0 → 15.0.2
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/android/src/main/java/so/oxy/security/OxyCallerPolicy.kt +0 -2
- package/lib/commonjs/ui/components/OxyProvider.js +8 -1
- package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
- package/lib/commonjs/ui/components/accountDialogHost.js +48 -0
- package/lib/commonjs/ui/components/accountDialogHost.js.map +1 -0
- package/lib/commonjs/ui/components/authChooser/primitives.js +5 -3
- package/lib/commonjs/ui/components/authChooser/primitives.js.map +1 -1
- package/lib/commonjs/ui/components/signIn/InlineCommonsQr.js +28 -25
- package/lib/commonjs/ui/components/signIn/InlineCommonsQr.js.map +1 -1
- package/lib/commonjs/ui/components/signIn/OxySignInPanel.js +63 -23
- package/lib/commonjs/ui/components/signIn/OxySignInPanel.js.map +1 -1
- package/lib/commonjs/ui/components/signIn/OxySignUpPanel.js +94 -26
- package/lib/commonjs/ui/components/signIn/OxySignUpPanel.js.map +1 -1
- package/lib/commonjs/ui/hooks/useUsernameAvailability.js +21 -7
- package/lib/commonjs/ui/hooks/useUsernameAvailability.js.map +1 -1
- package/lib/commonjs/ui/oauth/browserBridge.js +15 -1
- package/lib/commonjs/ui/oauth/browserBridge.js.map +1 -1
- package/lib/commonjs/ui/screens/OxyOneScreen.js +2 -2
- package/lib/commonjs/ui/screens/OxyOneScreen.js.map +1 -1
- package/lib/commonjs/ui/utils/handlePreview.js +20 -0
- package/lib/commonjs/ui/utils/handlePreview.js.map +1 -0
- package/lib/commonjs/ui/utils/usernameLookupBudget.js +95 -0
- package/lib/commonjs/ui/utils/usernameLookupBudget.js.map +1 -0
- package/lib/module/ui/components/OxyProvider.js +8 -1
- package/lib/module/ui/components/OxyProvider.js.map +1 -1
- package/lib/module/ui/components/accountDialogHost.js +42 -0
- package/lib/module/ui/components/accountDialogHost.js.map +1 -0
- package/lib/module/ui/components/authChooser/primitives.js +5 -3
- package/lib/module/ui/components/authChooser/primitives.js.map +1 -1
- package/lib/module/ui/components/signIn/InlineCommonsQr.js +28 -25
- package/lib/module/ui/components/signIn/InlineCommonsQr.js.map +1 -1
- package/lib/module/ui/components/signIn/OxySignInPanel.js +64 -24
- package/lib/module/ui/components/signIn/OxySignInPanel.js.map +1 -1
- package/lib/module/ui/components/signIn/OxySignUpPanel.js +95 -27
- package/lib/module/ui/components/signIn/OxySignUpPanel.js.map +1 -1
- package/lib/module/ui/hooks/useUsernameAvailability.js +21 -7
- package/lib/module/ui/hooks/useUsernameAvailability.js.map +1 -1
- package/lib/module/ui/oauth/browserBridge.js +14 -0
- package/lib/module/ui/oauth/browserBridge.js.map +1 -1
- package/lib/module/ui/screens/OxyOneScreen.js +2 -2
- package/lib/module/ui/screens/OxyOneScreen.js.map +1 -1
- package/lib/module/ui/utils/handlePreview.js +16 -0
- package/lib/module/ui/utils/handlePreview.js.map +1 -0
- package/lib/module/ui/utils/usernameLookupBudget.js +88 -0
- package/lib/module/ui/utils/usernameLookupBudget.js.map +1 -0
- package/lib/typescript/commonjs/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/accountDialogHost.d.ts +24 -0
- package/lib/typescript/commonjs/ui/components/accountDialogHost.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/authChooser/primitives.d.ts +5 -3
- package/lib/typescript/commonjs/ui/components/authChooser/primitives.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/signIn/InlineCommonsQr.d.ts +6 -0
- package/lib/typescript/commonjs/ui/components/signIn/InlineCommonsQr.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/signIn/OxySignInPanel.d.ts +4 -2
- package/lib/typescript/commonjs/ui/components/signIn/OxySignInPanel.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/signIn/OxySignUpPanel.d.ts +12 -2
- package/lib/typescript/commonjs/ui/components/signIn/OxySignUpPanel.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useUsernameAvailability.d.ts +15 -1
- package/lib/typescript/commonjs/ui/hooks/useUsernameAvailability.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/oauth/browserBridge.d.ts +4 -0
- package/lib/typescript/commonjs/ui/oauth/browserBridge.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/types/navigation.d.ts +14 -0
- package/lib/typescript/commonjs/ui/types/navigation.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/utils/handlePreview.d.ts +10 -0
- package/lib/typescript/commonjs/ui/utils/handlePreview.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/utils/usernameLookupBudget.d.ts +36 -0
- package/lib/typescript/commonjs/ui/utils/usernameLookupBudget.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/accountDialogHost.d.ts +24 -0
- package/lib/typescript/module/ui/components/accountDialogHost.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/authChooser/primitives.d.ts +5 -3
- package/lib/typescript/module/ui/components/authChooser/primitives.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/signIn/InlineCommonsQr.d.ts +6 -0
- package/lib/typescript/module/ui/components/signIn/InlineCommonsQr.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/signIn/OxySignInPanel.d.ts +4 -2
- package/lib/typescript/module/ui/components/signIn/OxySignInPanel.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/signIn/OxySignUpPanel.d.ts +12 -2
- package/lib/typescript/module/ui/components/signIn/OxySignUpPanel.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useUsernameAvailability.d.ts +15 -1
- package/lib/typescript/module/ui/hooks/useUsernameAvailability.d.ts.map +1 -1
- package/lib/typescript/module/ui/oauth/browserBridge.d.ts +4 -0
- package/lib/typescript/module/ui/oauth/browserBridge.d.ts.map +1 -1
- package/lib/typescript/module/ui/types/navigation.d.ts +14 -0
- package/lib/typescript/module/ui/types/navigation.d.ts.map +1 -1
- package/lib/typescript/module/ui/utils/handlePreview.d.ts +10 -0
- package/lib/typescript/module/ui/utils/handlePreview.d.ts.map +1 -0
- package/lib/typescript/module/ui/utils/usernameLookupBudget.d.ts +36 -0
- package/lib/typescript/module/ui/utils/usernameLookupBudget.d.ts.map +1 -0
- package/package.json +3 -3
- package/src/ui/components/OxyProvider.tsx +11 -1
- package/src/ui/components/accountDialogHost.tsx +54 -0
- package/src/ui/components/authChooser/primitives.tsx +5 -3
- package/src/ui/components/signIn/InlineCommonsQr.tsx +24 -18
- package/src/ui/components/signIn/OxySignInPanel.tsx +64 -22
- package/src/ui/components/signIn/OxySignUpPanel.tsx +115 -26
- package/src/ui/hooks/useUsernameAvailability.ts +42 -7
- package/src/ui/oauth/__tests__/browserBridge.test.ts +6 -0
- package/src/ui/oauth/browserBridge.ts +13 -0
- package/src/ui/screens/OxyOneScreen.tsx +2 -2
- package/src/ui/types/navigation.ts +14 -0
- package/src/ui/utils/handlePreview.ts +16 -0
- package/src/ui/utils/usernameLookupBudget.ts +91 -0
|
@@ -8,9 +8,11 @@ import type React from 'react';
|
|
|
8
8
|
* A SUBORDINATE action: a small centred text link, never a button.
|
|
9
9
|
*
|
|
10
10
|
* This is the single visual grammar for everything that is not the surface's one
|
|
11
|
-
* primary action (issue #691) —
|
|
12
|
-
*
|
|
13
|
-
*
|
|
11
|
+
* primary action (issue #691) — every alternative revealed behind "Having trouble?".
|
|
12
|
+
* Keeping them all on one component is what stops an alternative from quietly
|
|
13
|
+
* growing into a co-equal button again. "Create account" on the sign-in screen is
|
|
14
|
+
* the exception: it is a full-width button, because a text link was too easy for
|
|
15
|
+
* a new person to miss.
|
|
14
16
|
*
|
|
15
17
|
* Bloom's plain `Button` in the secondary link tone at `sm`: no fill or border, the
|
|
16
18
|
* secondary text colour, underlined under a pointer, and Bloom's link hit slop
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"primitives.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/authChooser/primitives.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B
|
|
1
|
+
{"version":3,"file":"primitives.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/authChooser/primitives.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAaA,CAAC"}
|
|
@@ -14,6 +14,12 @@
|
|
|
14
14
|
*/
|
|
15
15
|
import type React from 'react';
|
|
16
16
|
import type { AccountDialogController } from '@oxy.so/core/session';
|
|
17
|
+
/**
|
|
18
|
+
* The caption over the photo carousel. 16px white on a dark plate: the old
|
|
19
|
+
* 12px white line with a text shadow was not readable on the photos.
|
|
20
|
+
*/
|
|
21
|
+
export declare const QR_CAPTION_FONT_SIZE = 16;
|
|
22
|
+
export declare const QR_CAPTION_SCRIM = "rgba(0, 0, 0, 0.78)";
|
|
17
23
|
export declare const InlineCommonsQr: React.FC<{
|
|
18
24
|
controller: AccountDialogController | null;
|
|
19
25
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InlineCommonsQr.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/signIn/InlineCommonsQr.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAU/B,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"InlineCommonsQr.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/signIn/InlineCommonsQr.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAU/B,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAYpE;;;GAGG;AACH,eAAO,MAAM,oBAAoB,KAAK,CAAC;AACvC,eAAO,MAAM,gBAAgB,wBAAwB,CAAC;AAEtD,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC;IAAE,UAAU,EAAE,uBAAuB,GAAG,IAAI,CAAA;CAAE,CA+EpF,CAAC"}
|
|
@@ -4,8 +4,10 @@
|
|
|
4
4
|
* differs (`host`). Sign-in happens IN it, on every origin: no window opens.
|
|
5
5
|
*
|
|
6
6
|
* picker a returning device: "Choose an account", then "Use another account"
|
|
7
|
-
* identifier the header
|
|
8
|
-
*
|
|
7
|
+
* identifier the header (what an Oxy account is, naming the host app when the
|
|
8
|
+
* dialog knows it), the Commons way in, and "Email or username"
|
|
9
|
+
* with its Continue, then a Create account button. On the web,
|
|
10
|
+
* from `md`, the screen is Bloom `AuthCard`'s
|
|
9
11
|
* split card and the Commons way in is the embedded QR over its
|
|
10
12
|
* photo carousel, in the right column (the account dialog grows to
|
|
11
13
|
* that card); below `md` it is "Continue with Oxy" at the top. A
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OxySignInPanel.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/signIn/OxySignInPanel.tsx"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"OxySignInPanel.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/signIn/OxySignInPanel.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AA+D/B,uFAAuF;AACvF,eAAO,MAAM,oBAAoB,OAAO,CAAC;AACzC,wDAAwD;AACxD,eAAO,MAAM,6BAA6B,KAAK,CAAC;AA4BhD,MAAM,WAAW,mBAAmB;IAClC,wCAAwC;IACxC,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,+CAA+C;IAC/C,eAAe,EAAE,MAAM,IAAI,CAAC;IAC5B,mFAAmF;IACnF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qDAAqD;IACrD,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAC;CAC1B;AAED,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CA+wBxD,CAAC"}
|
|
@@ -10,8 +10,10 @@
|
|
|
10
10
|
* The email is confirmed before the account exists, and it is how the account
|
|
11
11
|
* signs in (a code or a link each time). A password and an authenticator app
|
|
12
12
|
* are added later, in the account's security settings. Commons stays the way to
|
|
13
|
-
* hold your own key:
|
|
14
|
-
* makes the account self-custodied
|
|
13
|
+
* hold your own key: the username step says what that means, then "Create it in
|
|
14
|
+
* Commons instead" — and linking Commons later makes the account self-custodied
|
|
15
|
+
* and deletes the email. A host may preview the profile the username becomes
|
|
16
|
+
* (`handlePreviewTemplate`); this screen never names an app's domain itself.
|
|
15
17
|
*/
|
|
16
18
|
import type React from 'react';
|
|
17
19
|
export interface OxySignUpPanelProps {
|
|
@@ -24,6 +26,14 @@ export interface OxySignUpPanelProps {
|
|
|
24
26
|
* this screen (`signInFlowStore`). `page` — a page of its own.
|
|
25
27
|
*/
|
|
26
28
|
host?: 'dialog' | 'page';
|
|
29
|
+
/**
|
|
30
|
+
* Preview of the public profile this username becomes. `{username}` is
|
|
31
|
+
* replaced with the typed handle. The host writes its own origin, for
|
|
32
|
+
* example `{base}/@{username}` with that base already filled in. Omitted,
|
|
33
|
+
* the screen uses the template from `OxyProvider`, or shows none. Wins over
|
|
34
|
+
* the provider when both are set.
|
|
35
|
+
*/
|
|
36
|
+
handlePreviewTemplate?: string | null;
|
|
27
37
|
}
|
|
28
38
|
export declare const OxySignUpPanel: React.FC<OxySignUpPanelProps>;
|
|
29
39
|
//# sourceMappingURL=OxySignUpPanel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OxySignUpPanel.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/signIn/OxySignUpPanel.tsx"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"OxySignUpPanel.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/signIn/OxySignUpPanel.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAuD/B,MAAM,WAAW,mBAAmB;IAClC,6DAA6D;IAC7D,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,0CAA0C;IAC1C,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB;;;OAGG;IACH,IAAI,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAC;IACzB;;;;;;OAMG;IACH,qBAAqB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACvC;AAYD,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAmWxD,CAAC"}
|
|
@@ -1,5 +1,19 @@
|
|
|
1
|
+
export interface UsernameAvailabilityOptions {
|
|
2
|
+
/**
|
|
3
|
+
* When true (the default), a handle that already belongs to the signed-in
|
|
4
|
+
* account is "unchanged" and is not sent to the server. Signup passes false:
|
|
5
|
+
* a new account needs its own free handle, even on a device that is signed in.
|
|
6
|
+
*/
|
|
7
|
+
matchCurrentUser?: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Count preview lookups against the production ten-a-minute quota and stop
|
|
10
|
+
* one short of it. Signup sets this so Continue still has a lookup left.
|
|
11
|
+
* Profile editing leaves it off: saving there does not look the name up again.
|
|
12
|
+
*/
|
|
13
|
+
reserveSubmit?: boolean;
|
|
14
|
+
}
|
|
1
15
|
/** Debounced server check; a response only applies to the draft that requested it. */
|
|
2
|
-
export declare function useUsernameAvailability(value: string, enabled: boolean): {
|
|
16
|
+
export declare function useUsernameAvailability(value: string, enabled: boolean, options?: UsernameAvailabilityOptions): {
|
|
3
17
|
candidate: string;
|
|
4
18
|
status: string;
|
|
5
19
|
invalid: string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useUsernameAvailability.d.ts","sourceRoot":"","sources":["../../../../../src/ui/hooks/useUsernameAvailability.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useUsernameAvailability.d.ts","sourceRoot":"","sources":["../../../../../src/ui/hooks/useUsernameAvailability.ts"],"names":[],"mappings":"AAWA,MAAM,WAAW,2BAA2B;IAC1C;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B;;;;OAIG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,sFAAsF;AACtF,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,OAAO,EAChB,OAAO,CAAC,EAAE,2BAA2B;;;;;;EAgEtC"}
|
|
@@ -33,6 +33,10 @@ export declare const OXY_BRIDGE_WINDOW_NAME = "oxy-bridge";
|
|
|
33
33
|
* ceiling only stops a wedged window from holding the attempt open.
|
|
34
34
|
*/
|
|
35
35
|
export declare const DEFAULT_BRIDGE_TIMEOUT_MS = 15000;
|
|
36
|
+
/**
|
|
37
|
+
* What a bridge window that closed without answering logs. Exported for tests.
|
|
38
|
+
*/
|
|
39
|
+
export declare const BRIDGE_UNREACHABLE_WARNING = "The browser bridge window closed without answering, so this app signs in on a device of its own and the browser's shared session never sees the account. If this page sends `Cross-Origin-Opener-Policy: same-origin`, the bridge cannot reach window.opener: send `same-origin-allow-popups` (the `@oxy.so/core/server` default, ADR 0029 D2).";
|
|
36
40
|
/** The auth origin the bridge lives on: the authorize override's, else auth.oxy.so. */
|
|
37
41
|
export declare function resolveBridgeOrigin(authorizeBaseUrl?: string): string | null;
|
|
38
42
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browserBridge.d.ts","sourceRoot":"","sources":["../../../../../src/ui/oauth/browserBridge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD,mEAAmE;AACnE,eAAO,MAAM,4BAA4B,oBAAoB,CAAC;AAC9D,8EAA8E;AAC9E,eAAO,MAAM,6BAA6B,qBAAqB,CAAC;AAEhE,+EAA+E;AAC/E,eAAO,MAAM,sBAAsB,eAAe,CAAC;AAEnD;;;GAGG;AACH,eAAO,MAAM,yBAAyB,QAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"browserBridge.d.ts","sourceRoot":"","sources":["../../../../../src/ui/oauth/browserBridge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD,mEAAmE;AACnE,eAAO,MAAM,4BAA4B,oBAAoB,CAAC;AAC9D,8EAA8E;AAC9E,eAAO,MAAM,6BAA6B,qBAAqB,CAAC;AAEhE,+EAA+E;AAC/E,eAAO,MAAM,sBAAsB,eAAe,CAAC;AAEnD;;;GAGG;AACH,eAAO,MAAM,yBAAyB,QAAS,CAAC;AAEhD;;GAEG;AACH,eAAO,MAAM,0BAA0B,oVAC4S,CAAC;AAKpV,uFAAuF;AACvF,wBAAgB,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAQ5E;AAiBD;;;;GAIG;AACH,wBAAgB,gBAAgB,IAAI,gBAAgB,GAAG,IAAI,CAY1D;AAUD,yDA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+65,20 @@ export interface OxyProviderProps {
|
|
|
65
65
|
* flow cannot start.
|
|
66
66
|
*/
|
|
67
67
|
clientId?: string;
|
|
68
|
+
/**
|
|
69
|
+
* The app this provider's account dialog is signing into. When set, the
|
|
70
|
+
* sign-in screen says that one Oxy account works across this app and the
|
|
71
|
+
* others. Omitted, the line stays generic and names no app.
|
|
72
|
+
*/
|
|
73
|
+
appName?: string;
|
|
74
|
+
/**
|
|
75
|
+
* Preview of the public profile a new username becomes, shown while signing
|
|
76
|
+
* up. `{username}` is replaced with the typed handle. Pass the host's own
|
|
77
|
+
* profile path, for example `{base}/@{username}` with the host's origin
|
|
78
|
+
* already written in place of `{base}` (`https://example.com/@{username}`).
|
|
79
|
+
* This SDK does not know or insert an app's domain.
|
|
80
|
+
*/
|
|
81
|
+
handlePreviewTemplate?: string;
|
|
68
82
|
baseURL?: string;
|
|
69
83
|
authWebUrl?: string;
|
|
70
84
|
authRedirectUri?: string;
|
|
@@ -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,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAGtD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AAC1E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAEtE,MAAM,WAAW,cAAc;IAC7B,SAAS,EAAE,MAAM,OAAO,CAAC;IACzB,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB;AAED,MAAM,WAAW,eAAe;IAE9B,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,SAAS,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E,MAAM,CAAC;IAC/B,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+BG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B;;;;;;;;;;;;;;;;;OAiBG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B;;;;;;;OAOG;IACH,WAAW,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC;IACtC;;;;;OAKG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,EAAE,iBAAiB,CAAC;IAC7B,qFAAqF;IACrF,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B;;;;;;;;;;;;;;;;;OAiBG;IACH,cAAc,CAAC,EAAE,2BAA2B,CAAC;CAC9C;AAED,MAAM,WAAW,iBAAiB;IAChC,6FAA6F;IAC7F,iBAAiB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACtC,kEAAkE;IAClE,gBAAgB,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC;;;;OAIG;IACH,cAAc,EAAE,MAAM,CAAC;IACvB;;;;OAIG;IACH,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACnD,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CACpD"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The public profile a typed username would have, from a host template.
|
|
3
|
+
*
|
|
4
|
+
* `{username}` is the only token. The host writes its own origin into the
|
|
5
|
+
* template — `{base}/@{username}` means that host's base, not a domain this
|
|
6
|
+
* SDK knows. An empty handle, or a template with no `{username}`, previews
|
|
7
|
+
* nothing.
|
|
8
|
+
*/
|
|
9
|
+
export declare function renderHandlePreview(template: string | null | undefined, username: string): string | null;
|
|
10
|
+
//# sourceMappingURL=handlePreview.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handlePreview.d.ts","sourceRoot":"","sources":["../../../../../src/ui/utils/handlePreview.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACnC,QAAQ,EAAE,MAAM,GACf,MAAM,GAAG,IAAI,CAIf"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared budget for `GET /auth/check-username`.
|
|
3
|
+
*
|
|
4
|
+
* Outside development that route allows ten lookups a minute per IP
|
|
5
|
+
* (`checkLimiter` in `packages/api/src/routes/auth.ts`). Signup spends the
|
|
6
|
+
* same budget on a debounced preview while a name is typed and again when
|
|
7
|
+
* Continue confirms it. Preview stops one short of the limit, so typing
|
|
8
|
+
* cannot take the request Continue needs. A lookup already in flight or
|
|
9
|
+
* already answered for the same name is reused. Creating the account still
|
|
10
|
+
* checks uniqueness on its own.
|
|
11
|
+
*/
|
|
12
|
+
/** Production ceiling of `checkLimiter`. Development's higher cap is ignored. */
|
|
13
|
+
export declare const USERNAME_LOOKUP_LIMIT = 10;
|
|
14
|
+
/** How long `checkLimiter` remembers a lookup. */
|
|
15
|
+
export declare const USERNAME_LOOKUP_WINDOW_MS = 60000;
|
|
16
|
+
/**
|
|
17
|
+
* Preview lookups a single window may start. One slot stays for an explicit
|
|
18
|
+
* submit (`Continue`), which is the request typing must not spend.
|
|
19
|
+
*/
|
|
20
|
+
export declare const USERNAME_LOOKUP_BACKGROUND_MAX: number;
|
|
21
|
+
export type UsernameLookupPurpose = 'background' | 'submit';
|
|
22
|
+
/** Tests start from an empty window. */
|
|
23
|
+
export declare function resetUsernameLookupBudget(): void;
|
|
24
|
+
/** Seconds until a full window will accept another explicit lookup. `0` when it already can. */
|
|
25
|
+
export declare function usernameLookupCooldownSeconds(now?: number): number;
|
|
26
|
+
/**
|
|
27
|
+
* One network lookup per name at a time, counted against the production quota.
|
|
28
|
+
* `'deferred'` means this call would have been one past the purpose's room, so
|
|
29
|
+
* the caller must not hit the API (a 429 counts against the same window).
|
|
30
|
+
*/
|
|
31
|
+
export declare function shareUsernameLookup(username: string, purpose: UsernameLookupPurpose, check: (username: string) => Promise<{
|
|
32
|
+
available: boolean;
|
|
33
|
+
}>): Promise<{
|
|
34
|
+
available: boolean;
|
|
35
|
+
} | 'deferred'>;
|
|
36
|
+
//# sourceMappingURL=usernameLookupBudget.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usernameLookupBudget.d.ts","sourceRoot":"","sources":["../../../../../src/ui/utils/usernameLookupBudget.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,iFAAiF;AACjF,eAAO,MAAM,qBAAqB,KAAK,CAAC;AAExC,kDAAkD;AAClD,eAAO,MAAM,yBAAyB,QAAS,CAAC;AAEhD;;;GAGG;AACH,eAAO,MAAM,8BAA8B,QAA4B,CAAC;AAExE,MAAM,MAAM,qBAAqB,GAAG,YAAY,GAAG,QAAQ,CAAC;AAQ5D,wCAAwC;AACxC,wBAAgB,yBAAyB,IAAI,IAAI,CAIhD;AAcD,gGAAgG;AAChG,wBAAgB,6BAA6B,CAAC,GAAG,SAAa,GAAG,MAAM,CAMtE;AAED;;;;GAIG;AACH,wBAAsB,mBAAmB,CACvC,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,qBAAqB,EAC9B,KAAK,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC;IAAE,SAAS,EAAE,OAAO,CAAA;CAAE,CAAC,GAC3D,OAAO,CAAC;IAAE,SAAS,EAAE,OAAO,CAAA;CAAE,GAAG,UAAU,CAAC,CAqB9C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OxyProvider.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/OxyProvider.tsx"],"names":[],"mappings":"AACA,OAAO,EAAgC,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAG9D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"OxyProvider.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/OxyProvider.tsx"],"names":[],"mappings":"AACA,OAAO,EAAgC,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAG9D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAqB,CAAC;AAgC5D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AACH,QAAA,MAAM,WAAW,EAAE,EAAE,CAAC,gBAAgB,CAgLrC,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What the hosting app told the account dialog about itself.
|
|
3
|
+
*
|
|
4
|
+
* Both fields are optional. Without an app name the sign-in line stays
|
|
5
|
+
* generic, and without a handle template signup shows no profile preview.
|
|
6
|
+
* `OxyProvider` sets this; a screen mounted on its own (auth.oxy.so's
|
|
7
|
+
* `/login`) can pass the same facts as props, which win.
|
|
8
|
+
*/
|
|
9
|
+
import { type ReactNode } from 'react';
|
|
10
|
+
export interface AccountDialogHost {
|
|
11
|
+
/** The app this dialog signs into, when the host named it. */
|
|
12
|
+
appName?: string | null;
|
|
13
|
+
/**
|
|
14
|
+
* Preview of the public profile a new username becomes. `{username}` is
|
|
15
|
+
* replaced with the typed handle. The host writes its own origin.
|
|
16
|
+
*/
|
|
17
|
+
handlePreviewTemplate?: string | null;
|
|
18
|
+
}
|
|
19
|
+
export declare const AccountDialogHostProvider: React.FC<AccountDialogHost & {
|
|
20
|
+
children: ReactNode;
|
|
21
|
+
}>;
|
|
22
|
+
/** The hosting app's name and profile-preview template, or neither. */
|
|
23
|
+
export declare function useAccountDialogHost(): AccountDialogHost;
|
|
24
|
+
//# sourceMappingURL=accountDialogHost.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accountDialogHost.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/accountDialogHost.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAsC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAE3E,MAAM,WAAW,iBAAiB;IAChC,8DAA8D;IAC9D,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB;;;OAGG;IACH,qBAAqB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACvC;AAcD,eAAO,MAAM,yBAAyB,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,GAAG;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,CAe3F,CAAC;AAEF,uEAAuE;AACvE,wBAAgB,oBAAoB,IAAI,iBAAiB,CAExD"}
|
|
@@ -8,9 +8,11 @@ import type React from 'react';
|
|
|
8
8
|
* A SUBORDINATE action: a small centred text link, never a button.
|
|
9
9
|
*
|
|
10
10
|
* This is the single visual grammar for everything that is not the surface's one
|
|
11
|
-
* primary action (issue #691) —
|
|
12
|
-
*
|
|
13
|
-
*
|
|
11
|
+
* primary action (issue #691) — every alternative revealed behind "Having trouble?".
|
|
12
|
+
* Keeping them all on one component is what stops an alternative from quietly
|
|
13
|
+
* growing into a co-equal button again. "Create account" on the sign-in screen is
|
|
14
|
+
* the exception: it is a full-width button, because a text link was too easy for
|
|
15
|
+
* a new person to miss.
|
|
14
16
|
*
|
|
15
17
|
* Bloom's plain `Button` in the secondary link tone at `sm`: no fill or border, the
|
|
16
18
|
* secondary text colour, underlined under a pointer, and Bloom's link hit slop
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"primitives.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/authChooser/primitives.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B
|
|
1
|
+
{"version":3,"file":"primitives.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/authChooser/primitives.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAaA,CAAC"}
|
|
@@ -14,6 +14,12 @@
|
|
|
14
14
|
*/
|
|
15
15
|
import type React from 'react';
|
|
16
16
|
import type { AccountDialogController } from '@oxy.so/core/session';
|
|
17
|
+
/**
|
|
18
|
+
* The caption over the photo carousel. 16px white on a dark plate: the old
|
|
19
|
+
* 12px white line with a text shadow was not readable on the photos.
|
|
20
|
+
*/
|
|
21
|
+
export declare const QR_CAPTION_FONT_SIZE = 16;
|
|
22
|
+
export declare const QR_CAPTION_SCRIM = "rgba(0, 0, 0, 0.78)";
|
|
17
23
|
export declare const InlineCommonsQr: React.FC<{
|
|
18
24
|
controller: AccountDialogController | null;
|
|
19
25
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InlineCommonsQr.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/signIn/InlineCommonsQr.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAU/B,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"InlineCommonsQr.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/signIn/InlineCommonsQr.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAU/B,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAYpE;;;GAGG;AACH,eAAO,MAAM,oBAAoB,KAAK,CAAC;AACvC,eAAO,MAAM,gBAAgB,wBAAwB,CAAC;AAEtD,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC;IAAE,UAAU,EAAE,uBAAuB,GAAG,IAAI,CAAA;CAAE,CA+EpF,CAAC"}
|
|
@@ -4,8 +4,10 @@
|
|
|
4
4
|
* differs (`host`). Sign-in happens IN it, on every origin: no window opens.
|
|
5
5
|
*
|
|
6
6
|
* picker a returning device: "Choose an account", then "Use another account"
|
|
7
|
-
* identifier the header
|
|
8
|
-
*
|
|
7
|
+
* identifier the header (what an Oxy account is, naming the host app when the
|
|
8
|
+
* dialog knows it), the Commons way in, and "Email or username"
|
|
9
|
+
* with its Continue, then a Create account button. On the web,
|
|
10
|
+
* from `md`, the screen is Bloom `AuthCard`'s
|
|
9
11
|
* split card and the Commons way in is the embedded QR over its
|
|
10
12
|
* photo carousel, in the right column (the account dialog grows to
|
|
11
13
|
* that card); below `md` it is "Continue with Oxy" at the top. A
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OxySignInPanel.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/signIn/OxySignInPanel.tsx"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"OxySignInPanel.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/signIn/OxySignInPanel.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AA+D/B,uFAAuF;AACvF,eAAO,MAAM,oBAAoB,OAAO,CAAC;AACzC,wDAAwD;AACxD,eAAO,MAAM,6BAA6B,KAAK,CAAC;AA4BhD,MAAM,WAAW,mBAAmB;IAClC,wCAAwC;IACxC,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,+CAA+C;IAC/C,eAAe,EAAE,MAAM,IAAI,CAAC;IAC5B,mFAAmF;IACnF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qDAAqD;IACrD,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAC;CAC1B;AAED,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CA+wBxD,CAAC"}
|
|
@@ -10,8 +10,10 @@
|
|
|
10
10
|
* The email is confirmed before the account exists, and it is how the account
|
|
11
11
|
* signs in (a code or a link each time). A password and an authenticator app
|
|
12
12
|
* are added later, in the account's security settings. Commons stays the way to
|
|
13
|
-
* hold your own key:
|
|
14
|
-
* makes the account self-custodied
|
|
13
|
+
* hold your own key: the username step says what that means, then "Create it in
|
|
14
|
+
* Commons instead" — and linking Commons later makes the account self-custodied
|
|
15
|
+
* and deletes the email. A host may preview the profile the username becomes
|
|
16
|
+
* (`handlePreviewTemplate`); this screen never names an app's domain itself.
|
|
15
17
|
*/
|
|
16
18
|
import type React from 'react';
|
|
17
19
|
export interface OxySignUpPanelProps {
|
|
@@ -24,6 +26,14 @@ export interface OxySignUpPanelProps {
|
|
|
24
26
|
* this screen (`signInFlowStore`). `page` — a page of its own.
|
|
25
27
|
*/
|
|
26
28
|
host?: 'dialog' | 'page';
|
|
29
|
+
/**
|
|
30
|
+
* Preview of the public profile this username becomes. `{username}` is
|
|
31
|
+
* replaced with the typed handle. The host writes its own origin, for
|
|
32
|
+
* example `{base}/@{username}` with that base already filled in. Omitted,
|
|
33
|
+
* the screen uses the template from `OxyProvider`, or shows none. Wins over
|
|
34
|
+
* the provider when both are set.
|
|
35
|
+
*/
|
|
36
|
+
handlePreviewTemplate?: string | null;
|
|
27
37
|
}
|
|
28
38
|
export declare const OxySignUpPanel: React.FC<OxySignUpPanelProps>;
|
|
29
39
|
//# sourceMappingURL=OxySignUpPanel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OxySignUpPanel.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/signIn/OxySignUpPanel.tsx"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"OxySignUpPanel.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/signIn/OxySignUpPanel.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAuD/B,MAAM,WAAW,mBAAmB;IAClC,6DAA6D;IAC7D,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,0CAA0C;IAC1C,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB;;;OAGG;IACH,IAAI,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAC;IACzB;;;;;;OAMG;IACH,qBAAqB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACvC;AAYD,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAmWxD,CAAC"}
|
|
@@ -1,5 +1,19 @@
|
|
|
1
|
+
export interface UsernameAvailabilityOptions {
|
|
2
|
+
/**
|
|
3
|
+
* When true (the default), a handle that already belongs to the signed-in
|
|
4
|
+
* account is "unchanged" and is not sent to the server. Signup passes false:
|
|
5
|
+
* a new account needs its own free handle, even on a device that is signed in.
|
|
6
|
+
*/
|
|
7
|
+
matchCurrentUser?: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Count preview lookups against the production ten-a-minute quota and stop
|
|
10
|
+
* one short of it. Signup sets this so Continue still has a lookup left.
|
|
11
|
+
* Profile editing leaves it off: saving there does not look the name up again.
|
|
12
|
+
*/
|
|
13
|
+
reserveSubmit?: boolean;
|
|
14
|
+
}
|
|
1
15
|
/** Debounced server check; a response only applies to the draft that requested it. */
|
|
2
|
-
export declare function useUsernameAvailability(value: string, enabled: boolean): {
|
|
16
|
+
export declare function useUsernameAvailability(value: string, enabled: boolean, options?: UsernameAvailabilityOptions): {
|
|
3
17
|
candidate: string;
|
|
4
18
|
status: string;
|
|
5
19
|
invalid: string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useUsernameAvailability.d.ts","sourceRoot":"","sources":["../../../../../src/ui/hooks/useUsernameAvailability.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useUsernameAvailability.d.ts","sourceRoot":"","sources":["../../../../../src/ui/hooks/useUsernameAvailability.ts"],"names":[],"mappings":"AAWA,MAAM,WAAW,2BAA2B;IAC1C;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B;;;;OAIG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,sFAAsF;AACtF,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,OAAO,EAChB,OAAO,CAAC,EAAE,2BAA2B;;;;;;EAgEtC"}
|
|
@@ -33,6 +33,10 @@ export declare const OXY_BRIDGE_WINDOW_NAME = "oxy-bridge";
|
|
|
33
33
|
* ceiling only stops a wedged window from holding the attempt open.
|
|
34
34
|
*/
|
|
35
35
|
export declare const DEFAULT_BRIDGE_TIMEOUT_MS = 15000;
|
|
36
|
+
/**
|
|
37
|
+
* What a bridge window that closed without answering logs. Exported for tests.
|
|
38
|
+
*/
|
|
39
|
+
export declare const BRIDGE_UNREACHABLE_WARNING = "The browser bridge window closed without answering, so this app signs in on a device of its own and the browser's shared session never sees the account. If this page sends `Cross-Origin-Opener-Policy: same-origin`, the bridge cannot reach window.opener: send `same-origin-allow-popups` (the `@oxy.so/core/server` default, ADR 0029 D2).";
|
|
36
40
|
/** The auth origin the bridge lives on: the authorize override's, else auth.oxy.so. */
|
|
37
41
|
export declare function resolveBridgeOrigin(authorizeBaseUrl?: string): string | null;
|
|
38
42
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browserBridge.d.ts","sourceRoot":"","sources":["../../../../../src/ui/oauth/browserBridge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAS,CAAC;AAEhD,mEAAmE;AACnE,eAAO,MAAM,4BAA4B,oBAAoB,CAAC;AAC9D,8EAA8E;AAC9E,eAAO,MAAM,6BAA6B,qBAAqB,CAAC;AAEhE,+EAA+E;AAC/E,eAAO,MAAM,sBAAsB,eAAe,CAAC;AAEnD;;;GAGG;AACH,eAAO,MAAM,yBAAyB,QAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"browserBridge.d.ts","sourceRoot":"","sources":["../../../../../src/ui/oauth/browserBridge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAS,CAAC;AAEhD,mEAAmE;AACnE,eAAO,MAAM,4BAA4B,oBAAoB,CAAC;AAC9D,8EAA8E;AAC9E,eAAO,MAAM,6BAA6B,qBAAqB,CAAC;AAEhE,+EAA+E;AAC/E,eAAO,MAAM,sBAAsB,eAAe,CAAC;AAEnD;;;GAGG;AACH,eAAO,MAAM,yBAAyB,QAAS,CAAC;AAEhD;;GAEG;AACH,eAAO,MAAM,0BAA0B,oVAC4S,CAAC;AAKpV,uFAAuF;AACvF,wBAAgB,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAQ5E;AAiBD;;;;GAIG;AACH,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,GAC/B,OAAO,CAAC,mBAAmB,CAAC,CA0D9B"}
|
|
@@ -65,6 +65,20 @@ export interface OxyProviderProps {
|
|
|
65
65
|
* flow cannot start.
|
|
66
66
|
*/
|
|
67
67
|
clientId?: string;
|
|
68
|
+
/**
|
|
69
|
+
* The app this provider's account dialog is signing into. When set, the
|
|
70
|
+
* sign-in screen says that one Oxy account works across this app and the
|
|
71
|
+
* others. Omitted, the line stays generic and names no app.
|
|
72
|
+
*/
|
|
73
|
+
appName?: string;
|
|
74
|
+
/**
|
|
75
|
+
* Preview of the public profile a new username becomes, shown while signing
|
|
76
|
+
* up. `{username}` is replaced with the typed handle. Pass the host's own
|
|
77
|
+
* profile path, for example `{base}/@{username}` with the host's origin
|
|
78
|
+
* already written in place of `{base}` (`https://example.com/@{username}`).
|
|
79
|
+
* This SDK does not know or insert an app's domain.
|
|
80
|
+
*/
|
|
81
|
+
handlePreviewTemplate?: string;
|
|
68
82
|
baseURL?: string;
|
|
69
83
|
authWebUrl?: string;
|
|
70
84
|
authRedirectUri?: string;
|
|
@@ -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,SAAS,EAAE,MAAM,yBAAsB,CAAC;AAGtD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,2BAAwB,CAAC;AAC1E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAgB,CAAC;AAClD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kCAA+B,CAAC;AAEtE,MAAM,WAAW,cAAc;IAC7B,SAAS,EAAE,MAAM,OAAO,CAAC;IACzB,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB;AAED,MAAM,WA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the only token. The host writes its own origin into the
|
|
5
|
+
* template — `{base}/@{username}` means that host's base, not a domain this
|
|
6
|
+
* SDK knows. An empty handle, or a template with no `{username}`, previews
|
|
7
|
+
* nothing.
|
|
8
|
+
*/
|
|
9
|
+
export declare function renderHandlePreview(template: string | null | undefined, username: string): string | null;
|
|
10
|
+
//# sourceMappingURL=handlePreview.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handlePreview.d.ts","sourceRoot":"","sources":["../../../../../src/ui/utils/handlePreview.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACnC,QAAQ,EAAE,MAAM,GACf,MAAM,GAAG,IAAI,CAIf"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared budget for `GET /auth/check-username`.
|
|
3
|
+
*
|
|
4
|
+
* Outside development that route allows ten lookups a minute per IP
|
|
5
|
+
* (`checkLimiter` in `packages/api/src/routes/auth.ts`). Signup spends the
|
|
6
|
+
* same budget on a debounced preview while a name is typed and again when
|
|
7
|
+
* Continue confirms it. Preview stops one short of the limit, so typing
|
|
8
|
+
* cannot take the request Continue needs. A lookup already in flight or
|
|
9
|
+
* already answered for the same name is reused. Creating the account still
|
|
10
|
+
* checks uniqueness on its own.
|
|
11
|
+
*/
|
|
12
|
+
/** Production ceiling of `checkLimiter`. Development's higher cap is ignored. */
|
|
13
|
+
export declare const USERNAME_LOOKUP_LIMIT = 10;
|
|
14
|
+
/** How long `checkLimiter` remembers a lookup. */
|
|
15
|
+
export declare const USERNAME_LOOKUP_WINDOW_MS = 60000;
|
|
16
|
+
/**
|
|
17
|
+
* Preview lookups a single window may start. One slot stays for an explicit
|
|
18
|
+
* submit (`Continue`), which is the request typing must not spend.
|
|
19
|
+
*/
|
|
20
|
+
export declare const USERNAME_LOOKUP_BACKGROUND_MAX: number;
|
|
21
|
+
export type UsernameLookupPurpose = 'background' | 'submit';
|
|
22
|
+
/** Tests start from an empty window. */
|
|
23
|
+
export declare function resetUsernameLookupBudget(): void;
|
|
24
|
+
/** Seconds until a full window will accept another explicit lookup. `0` when it already can. */
|
|
25
|
+
export declare function usernameLookupCooldownSeconds(now?: number): number;
|
|
26
|
+
/**
|
|
27
|
+
* One network lookup per name at a time, counted against the production quota.
|
|
28
|
+
* `'deferred'` means this call would have been one past the purpose's room, so
|
|
29
|
+
* the caller must not hit the API (a 429 counts against the same window).
|
|
30
|
+
*/
|
|
31
|
+
export declare function shareUsernameLookup(username: string, purpose: UsernameLookupPurpose, check: (username: string) => Promise<{
|
|
32
|
+
available: boolean;
|
|
33
|
+
}>): Promise<{
|
|
34
|
+
available: boolean;
|
|
35
|
+
} | 'deferred'>;
|
|
36
|
+
//# sourceMappingURL=usernameLookupBudget.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usernameLookupBudget.d.ts","sourceRoot":"","sources":["../../../../../src/ui/utils/usernameLookupBudget.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,iFAAiF;AACjF,eAAO,MAAM,qBAAqB,KAAK,CAAC;AAExC,kDAAkD;AAClD,eAAO,MAAM,yBAAyB,QAAS,CAAC;AAEhD;;;GAGG;AACH,eAAO,MAAM,8BAA8B,QAA4B,CAAC;AAExE,MAAM,MAAM,qBAAqB,GAAG,YAAY,GAAG,QAAQ,CAAC;AAQ5D,wCAAwC;AACxC,wBAAgB,yBAAyB,IAAI,IAAI,CAIhD;AAcD,gGAAgG;AAChG,wBAAgB,6BAA6B,CAAC,GAAG,SAAa,GAAG,MAAM,CAMtE;AAED;;;;GAIG;AACH,wBAAsB,mBAAmB,CACvC,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,qBAAqB,EAC9B,KAAK,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC;IAAE,SAAS,EAAE,OAAO,CAAA;CAAE,CAAC,GAC3D,OAAO,CAAC;IAAE,SAAS,EAAE,OAAO,CAAA;CAAE,GAAG,UAAU,CAAC,CAqB9C"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oxy.so/services",
|
|
3
|
-
"version": "15.0.
|
|
3
|
+
"version": "15.0.2",
|
|
4
4
|
"description": "OxyHQ Expo/React Native SDK — UI components, screens, and native features",
|
|
5
5
|
"main": "lib/commonjs/index.js",
|
|
6
6
|
"module": "lib/module/index.js",
|
|
@@ -176,14 +176,14 @@
|
|
|
176
176
|
"delete-dts.js": "find ./lib/commonjs ./lib/module \\( -name '*.d.js*' -o -name '*.d.ts' \\) -delete"
|
|
177
177
|
},
|
|
178
178
|
"dependencies": {
|
|
179
|
-
"@oxy.so/contracts": "^7.
|
|
179
|
+
"@oxy.so/contracts": "^7.7.0",
|
|
180
180
|
"color": "^5.0.3",
|
|
181
181
|
"@peable.to/sdk": "^4.0.0"
|
|
182
182
|
},
|
|
183
183
|
"devDependencies": {
|
|
184
184
|
"@expo/app-integrity": "~58.0.2",
|
|
185
185
|
"@expo/vector-icons": "^15.1.1",
|
|
186
|
-
"@oxy.so/core": "7.
|
|
186
|
+
"@oxy.so/core": "7.60.1",
|
|
187
187
|
"@react-native-async-storage/async-storage": "^3.1.1",
|
|
188
188
|
"@react-native-community/netinfo": "^12.0.1",
|
|
189
189
|
"@react-native/babel-preset": "^0.88.1",
|
|
@@ -23,6 +23,7 @@ import { ProductAnalyticsObserver } from '../analytics/productAnalytics';
|
|
|
23
23
|
import { AccountLanguageBoundary } from './AccountLanguageBoundary';
|
|
24
24
|
import { BloomLocaleBridge } from './BloomLocaleBridge';
|
|
25
25
|
import { SupervisionStateObserver } from '../hooks/queries/useSupervision';
|
|
26
|
+
import { AccountDialogHostProvider } from './accountDialogHost';
|
|
26
27
|
|
|
27
28
|
const bootStyles = StyleSheet.create({
|
|
28
29
|
providerRoot: {
|
|
@@ -94,6 +95,8 @@ const OxyProvider: FC<OxyProviderProps> = ({
|
|
|
94
95
|
productAnalytics,
|
|
95
96
|
storageKeyPrefix,
|
|
96
97
|
clientId,
|
|
98
|
+
appName,
|
|
99
|
+
handlePreviewTemplate,
|
|
97
100
|
baseURL,
|
|
98
101
|
authWebUrl,
|
|
99
102
|
authRedirectUri,
|
|
@@ -246,7 +249,14 @@ const OxyProvider: FC<OxyProviderProps> = ({
|
|
|
246
249
|
return (
|
|
247
250
|
<GestureHandlerRootView style={bootStyles.providerRoot}>
|
|
248
251
|
<SafeAreaRoot>
|
|
249
|
-
<KeyboardBoundary>
|
|
252
|
+
<KeyboardBoundary>
|
|
253
|
+
<AccountDialogHostProvider
|
|
254
|
+
appName={appName}
|
|
255
|
+
handlePreviewTemplate={handlePreviewTemplate}
|
|
256
|
+
>
|
|
257
|
+
{coreContent}
|
|
258
|
+
</AccountDialogHostProvider>
|
|
259
|
+
</KeyboardBoundary>
|
|
250
260
|
</SafeAreaRoot>
|
|
251
261
|
</GestureHandlerRootView>
|
|
252
262
|
);
|