@oxyhq/services 10.3.2 → 10.4.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/ui/components/FollowButton.js +23 -3
- package/lib/commonjs/ui/components/FollowButton.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 +49 -9
- package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
- package/lib/commonjs/ui/hooks/queries/queryKeys.js +5 -0
- package/lib/commonjs/ui/hooks/queries/queryKeys.js.map +1 -1
- package/lib/commonjs/ui/hooks/useFollow.js +35 -12
- package/lib/commonjs/ui/hooks/useFollow.js.map +1 -1
- package/lib/commonjs/ui/stores/followStore.js +68 -0
- package/lib/commonjs/ui/stores/followStore.js.map +1 -1
- package/lib/module/ui/components/FollowButton.js +23 -3
- package/lib/module/ui/components/FollowButton.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 +49 -9
- package/lib/module/ui/context/OxyContext.js.map +1 -1
- package/lib/module/ui/hooks/queries/queryKeys.js +5 -0
- package/lib/module/ui/hooks/queries/queryKeys.js.map +1 -1
- package/lib/module/ui/hooks/useFollow.js +36 -13
- package/lib/module/ui/hooks/useFollow.js.map +1 -1
- package/lib/module/ui/stores/followStore.js +68 -0
- package/lib/module/ui/stores/followStore.js.map +1 -1
- package/lib/typescript/commonjs/ui/components/FollowButton.d.ts +2 -1
- package/lib/typescript/commonjs/ui/components/FollowButton.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 +10 -0
- package/lib/typescript/commonjs/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/queries/queryKeys.d.ts +4 -0
- package/lib/typescript/commonjs/ui/hooks/queries/queryKeys.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useFollow.d.ts +3 -1
- package/lib/typescript/commonjs/ui/hooks/useFollow.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/stores/followStore.d.ts +2 -1
- package/lib/typescript/commonjs/ui/stores/followStore.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/types/navigation.d.ts +17 -0
- package/lib/typescript/commonjs/ui/types/navigation.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/FollowButton.d.ts +2 -1
- package/lib/typescript/module/ui/components/FollowButton.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 +10 -0
- package/lib/typescript/module/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/queries/queryKeys.d.ts +4 -0
- package/lib/typescript/module/ui/hooks/queries/queryKeys.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useFollow.d.ts +3 -1
- package/lib/typescript/module/ui/hooks/useFollow.d.ts.map +1 -1
- package/lib/typescript/module/ui/stores/followStore.d.ts +2 -1
- package/lib/typescript/module/ui/stores/followStore.d.ts.map +1 -1
- package/lib/typescript/module/ui/types/navigation.d.ts +17 -0
- package/lib/typescript/module/ui/types/navigation.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/ui/components/FollowButton.tsx +26 -4
- package/src/ui/components/OxyProvider.tsx +2 -0
- package/src/ui/context/OxyContext.tsx +59 -8
- package/src/ui/hooks/queries/queryKeys.ts +6 -0
- package/src/ui/hooks/useFollow.ts +37 -12
- package/src/ui/stores/followStore.ts +47 -1
- package/src/ui/types/navigation.ts +17 -0
|
@@ -59,6 +59,10 @@ export declare const queryKeys: {
|
|
|
59
59
|
readonly all: readonly ["connectedApps"];
|
|
60
60
|
readonly list: () => readonly ["connectedApps", "list"];
|
|
61
61
|
};
|
|
62
|
+
readonly follow: {
|
|
63
|
+
readonly all: readonly ["follow"];
|
|
64
|
+
readonly counts: (userId: string) => readonly ["follow", "counts", string];
|
|
65
|
+
};
|
|
62
66
|
readonly payments: {
|
|
63
67
|
readonly all: readonly ["payments"];
|
|
64
68
|
readonly subscription: (userId?: string) => readonly ["payments", "subscription", string];
|
|
@@ -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;;;;;;;iCASV,MAAM,EAAE;;kCAEP,MAAM;sCACF,MAAM;;;;;iCAOX,MAAM;;qCAEF,MAAM;;oCAEP,MAAM;;;;;iCAOT,MAAM;;oCAEH,MAAM;;;;qCAML,MAAM;;;;oCAMP,MAAM,WAAW,MAAM,cAAc,MAAM;iCAE9C,MAAM;mCAEJ,MAAM,cAAc,MAAM;;;;;;;;;;;;
|
|
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;;;;;;;iCASV,MAAM,EAAE;;kCAEP,MAAM;sCACF,MAAM;;;;;iCAOX,MAAM;;qCAEF,MAAM;;oCAEP,MAAM;;;;;iCAOT,MAAM;;oCAEH,MAAM;;;;qCAML,MAAM;;;;oCAMP,MAAM,WAAW,MAAM,cAAc,MAAM;iCAE9C,MAAM;mCAEJ,MAAM,cAAc,MAAM;;;;;;;;;;;;kCAmB3B,MAAM;;;;yCAMC,MAAM;oCAEX,MAAM;mCAEP,MAAM;8CAEK,MAAM,WAAW,MAAM,WAAW,MAAM;;CAU/D,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,wBAAwB,GAAI,aAAa,WAAW,KAAG,IAEnE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,qBAAqB,GAAI,aAAa,WAAW,KAAG,IAEhE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,wBAAwB,GAAI,aAAa,WAAW,KAAG,IAEnE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,uBAAuB,GAAI,aAAa,WAAW,KAAG,IAElE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,wBAAwB,GAAI,aAAa,WAAW,KAAG,IAEnE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,yBAAyB,GAAI,aAAa,WAAW,KAAG,IAEpE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,wBAAwB,GAAI,aAAa,WAAW,KAAG,IAEnE,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"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type OxyServices, type BulkFollowResult } from '@oxyhq/core';
|
|
1
|
+
import { type OxyServices, type BulkFollowResult, type BulkUnfollowResult } from '@oxyhq/core';
|
|
2
2
|
/**
|
|
3
3
|
* useFollow — Hook for follow state management.
|
|
4
4
|
*
|
|
@@ -32,6 +32,7 @@ export declare const useFollow: (userId?: string | string[]) => {
|
|
|
32
32
|
fetchStatusForUser?: undefined;
|
|
33
33
|
fetchAllStatuses?: undefined;
|
|
34
34
|
followAllUsers?: undefined;
|
|
35
|
+
unfollowAllUsers?: undefined;
|
|
35
36
|
clearErrorForUser?: undefined;
|
|
36
37
|
isAnyLoading?: undefined;
|
|
37
38
|
hasAnyError?: undefined;
|
|
@@ -48,6 +49,7 @@ export declare const useFollow: (userId?: string | string[]) => {
|
|
|
48
49
|
fetchStatusForUser: (targetUserId: string) => Promise<void>;
|
|
49
50
|
fetchAllStatuses: () => Promise<void>;
|
|
50
51
|
followAllUsers: () => Promise<BulkFollowResult>;
|
|
52
|
+
unfollowAllUsers: () => Promise<BulkUnfollowResult>;
|
|
51
53
|
clearErrorForUser: (targetUserId: string) => void;
|
|
52
54
|
isAnyLoading: boolean;
|
|
53
55
|
hasAnyError: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFollow.d.ts","sourceRoot":"","sources":["../../../../../src/ui/hooks/useFollow.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useFollow.d.ts","sourceRoot":"","sources":["../../../../../src/ui/hooks/useFollow.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,gBAAgB,EAAE,KAAK,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAI/F;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,SAAS,GAAI,SAAS,MAAM,GAAG,MAAM,EAAE;;;;;iCAmFF,OAAO;;;;;;;8BAqBV,MAAM;+BAKL,MAAM;;;;;;;;;;;;;;;qBA5DR,OAAO;mBAAa,OAAO;eAAS,MAAM,GAAG,IAAI;;wCA0FhC,MAAM;2CAMT,MAAM,aAAa,OAAO;uCAIxB,MAAM;;0BAYrB,OAAO,CAAC,gBAAgB,CAAC;4BAMvB,OAAO,CAAC,kBAAkB,CAAC;sCAKrB,MAAM;;;;;;;;;;;;;;;;;;CAyC5D,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB,GAAI,QAAQ,MAAM,EAAE,aAAa,WAAW;;;;;;iCAoBzB,OAAO;;CAiBxD,CAAC;AAGF,eAAO,MAAM,iBAAiB,GAAI,QAAQ,MAAM;;;;;8BAiBD,MAAM;+BAIL,MAAM;CAYrD,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { OxyServices, BulkFollowResult } from '@oxyhq/core';
|
|
1
|
+
import type { OxyServices, BulkFollowResult, BulkUnfollowResult } from '@oxyhq/core';
|
|
2
2
|
interface FollowState {
|
|
3
3
|
followingUsers: Record<string, boolean>;
|
|
4
4
|
loadingUsers: Record<string, boolean>;
|
|
@@ -13,6 +13,7 @@ interface FollowState {
|
|
|
13
13
|
fetchFollowStatus: (userId: string, oxyServices: OxyServices) => Promise<void>;
|
|
14
14
|
toggleFollowUser: (userId: string, oxyServices: OxyServices, isCurrentlyFollowing: boolean) => Promise<void>;
|
|
15
15
|
followManyUsers: (userIds: string[], oxyServices: OxyServices) => Promise<BulkFollowResult>;
|
|
16
|
+
unfollowManyUsers: (userIds: string[], oxyServices: OxyServices) => Promise<BulkUnfollowResult>;
|
|
16
17
|
setFollowerCount: (userId: string, count: number) => void;
|
|
17
18
|
setFollowingCount: (userId: string, count: number) => void;
|
|
18
19
|
updateCountsFromFollowAction: (targetUserId: string, action: 'follow' | 'unfollow', counts: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"followStore.d.ts","sourceRoot":"","sources":["../../../../../src/ui/stores/followStore.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"followStore.d.ts","sourceRoot":"","sources":["../../../../../src/ui/stores/followStore.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAErF,UAAU,WAAW;IACnB,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACxC,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACtC,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACvC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC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;IACtK,eAAe,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,WAAW,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAC9E;AAED,eAAO,MAAM,cAAc,0EAmPxB,CAAC"}
|
|
@@ -42,5 +42,22 @@ export interface OxyProviderProps {
|
|
|
42
42
|
authWebUrl?: string;
|
|
43
43
|
authRedirectUri?: string;
|
|
44
44
|
queryClient?: QueryClient;
|
|
45
|
+
/**
|
|
46
|
+
* When `true`, skips ONLY the terminal SSO bounce in the web cold-boot
|
|
47
|
+
* chain — the force-redirect to `auth.<apex>/sso?prompt=none` that fires
|
|
48
|
+
* for a visitor with no recoverable local session. This lets a truly
|
|
49
|
+
* anonymous user keep browsing instead of being bounced to the central
|
|
50
|
+
* IdP (e.g. a marketplace that allows anonymous browsing like eBay /
|
|
51
|
+
* Shop.app).
|
|
52
|
+
*
|
|
53
|
+
* Session restore still runs in full: the callback consume, FedCM silent,
|
|
54
|
+
* first-party `/auth/silent` iframe, stored-session bearer, and
|
|
55
|
+
* cookie-restore steps all execute — so a returning signed-in user is
|
|
56
|
+
* still silently restored. Only the force-bounce for a genuinely
|
|
57
|
+
* anonymous visitor is suppressed.
|
|
58
|
+
*
|
|
59
|
+
* Default `false` (current behavior: the bounce fires).
|
|
60
|
+
*/
|
|
61
|
+
disableAutoSso?: boolean;
|
|
45
62
|
}
|
|
46
63
|
//# sourceMappingURL=navigation.d.ts.map
|
|
@@ -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,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AAK,IAAI,CAAC;IAGnD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,eAAe,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,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B;;;;;;;;;;;;;;;OAeG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;CAC5B"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type ViewStyle, type TextStyle, type StyleProp } from 'react-native';
|
|
3
|
-
import type { BulkFollowResult } from '@oxyhq/core';
|
|
3
|
+
import type { BulkFollowResult, BulkUnfollowResult } from '@oxyhq/core';
|
|
4
4
|
/** Props shared by both single- and multi-user follow modes. */
|
|
5
5
|
interface FollowButtonBaseProps {
|
|
6
6
|
size?: 'small' | 'medium' | 'large';
|
|
@@ -25,6 +25,7 @@ export interface MultiFollowButtonProps extends FollowButtonBaseProps {
|
|
|
25
25
|
followAllLabel?: string;
|
|
26
26
|
followedAllLabel?: string;
|
|
27
27
|
onBulkFollow?: (result: BulkFollowResult) => void;
|
|
28
|
+
onBulkUnfollow?: (result: BulkUnfollowResult) => void;
|
|
28
29
|
userId?: never;
|
|
29
30
|
}
|
|
30
31
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FollowButton.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/FollowButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA0D,MAAM,OAAO,CAAC;AAC/E,OAAO,EAGL,KAAK,SAAS,EACd,KAAK,SAAS,EACd,KAAK,SAAS,EAGf,MAAM,cAAc,CAAC;AAKtB,OAAO,KAAK,EAAe,gBAAgB,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"FollowButton.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/FollowButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA0D,MAAM,OAAO,CAAC;AAC/E,OAAO,EAGL,KAAK,SAAS,EACd,KAAK,SAAS,EACd,KAAK,SAAS,EAGf,MAAM,cAAc,CAAC;AAKtB,OAAO,KAAK,EAAe,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAKrF,gEAAgE;AAChE,UAAU,qBAAqB;IAC7B,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;IACpC,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,SAAS,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACjC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,KAAK,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IACzB,cAAc,CAAC,EAAE,CAAC,WAAW,EAAE,OAAO,KAAK,IAAI,CAAC;CACjD;AAED,yEAAyE;AACzE,MAAM,WAAW,uBAAwB,SAAQ,qBAAqB;IACpE,MAAM,EAAE,MAAM,CAAC;IACf,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,OAAO,CAAC,EAAE,KAAK,CAAC;CACjB;AAED,qFAAqF;AACrF,MAAM,WAAW,sBAAuB,SAAQ,qBAAqB;IACnE,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAClD,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,kBAAkB,KAAK,IAAI,CAAC;IACtD,MAAM,CAAC,EAAE,KAAK,CAAC;CAChB;AAED;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG,uBAAuB,GAAG,sBAAsB,CAAC;AA+MjF,QAAA,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAiD7C,CAAC;AAiDF,OAAO,EAAE,YAAY,EAAE,CAAC;AACxB,eAAe,YAAY,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;AAEjH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAiE5D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;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;AAEjH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAiE5D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,QAAA,MAAM,WAAW,EAAE,EAAE,CAAC,gBAAgB,CA4NrC,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -101,6 +101,16 @@ export interface OxyContextProviderProps {
|
|
|
101
101
|
* for the cross-app device sign-in flow. See {@link OxyContextState.clientId}.
|
|
102
102
|
*/
|
|
103
103
|
clientId?: string;
|
|
104
|
+
/**
|
|
105
|
+
* When `true`, skips ONLY the terminal `sso-bounce` cold-boot step — the
|
|
106
|
+
* force-redirect to `auth.<apex>/sso?prompt=none` that fires for a visitor
|
|
107
|
+
* with no recoverable local session. Every other cold-boot step still runs
|
|
108
|
+
* (callback consume, FedCM silent, `/auth/silent` iframe, stored-session,
|
|
109
|
+
* cookie-restore), so a returning signed-in user is still silently
|
|
110
|
+
* restored; only the bounce for a truly anonymous visitor is suppressed.
|
|
111
|
+
* Default `false`.
|
|
112
|
+
*/
|
|
113
|
+
disableAutoSso?: boolean;
|
|
104
114
|
onAuthStateChange?: (user: User | null) => void;
|
|
105
115
|
onError?: (error: ApiError) => void;
|
|
106
116
|
}
|
|
@@ -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;AAC/B,OAAO,EASL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,WAAW,EAAa,MAAM,aAAa,CAAC;AACrD,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACxE,OAAO,KAAK,EAAE,cAAc,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AAE7E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAqBjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,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;IAC7C,sBAAsB,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5C,oBAAoB,EAAE,CAAC,IAAI,EAAE,yBAAyB,KAAK,OAAO,CAAC,cAAc,CAAC,CAAC;CACpF;AAED,QAAA,MAAM,UAAU,uCAA8C,CAAC;AAM/D,MAAM,WAAW,uBAAuB;IACtC,QAAQ,EAAE,SAAS,CAAC;IACpB,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;;;;;OAQG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,KAAK,IAAI,CAAC;IAChD,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,QAAQ,KAAK,IAAI,CAAC;CACrC;AAqOD,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CA+9CzD,CAAC;AAEF,eAAO,MAAM,kBAAkB,mCAAc,CAAC;AA+D9C,eAAO,MAAM,MAAM,QAAO,eAMzB,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -59,6 +59,10 @@ export declare const queryKeys: {
|
|
|
59
59
|
readonly all: readonly ["connectedApps"];
|
|
60
60
|
readonly list: () => readonly ["connectedApps", "list"];
|
|
61
61
|
};
|
|
62
|
+
readonly follow: {
|
|
63
|
+
readonly all: readonly ["follow"];
|
|
64
|
+
readonly counts: (userId: string) => readonly ["follow", "counts", string];
|
|
65
|
+
};
|
|
62
66
|
readonly payments: {
|
|
63
67
|
readonly all: readonly ["payments"];
|
|
64
68
|
readonly subscription: (userId?: string) => readonly ["payments", "subscription", string];
|
|
@@ -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;;;;;;;iCASV,MAAM,EAAE;;kCAEP,MAAM;sCACF,MAAM;;;;;iCAOX,MAAM;;qCAEF,MAAM;;oCAEP,MAAM;;;;;iCAOT,MAAM;;oCAEH,MAAM;;;;qCAML,MAAM;;;;oCAMP,MAAM,WAAW,MAAM,cAAc,MAAM;iCAE9C,MAAM;mCAEJ,MAAM,cAAc,MAAM;;;;;;;;;;;;
|
|
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;;;;;;;iCASV,MAAM,EAAE;;kCAEP,MAAM;sCACF,MAAM;;;;;iCAOX,MAAM;;qCAEF,MAAM;;oCAEP,MAAM;;;;;iCAOT,MAAM;;oCAEH,MAAM;;;;qCAML,MAAM;;;;oCAMP,MAAM,WAAW,MAAM,cAAc,MAAM;iCAE9C,MAAM;mCAEJ,MAAM,cAAc,MAAM;;;;;;;;;;;;kCAmB3B,MAAM;;;;yCAMC,MAAM;oCAEX,MAAM;mCAEP,MAAM;8CAEK,MAAM,WAAW,MAAM,WAAW,MAAM;;CAU/D,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,wBAAwB,GAAI,aAAa,WAAW,KAAG,IAEnE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,qBAAqB,GAAI,aAAa,WAAW,KAAG,IAEhE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,wBAAwB,GAAI,aAAa,WAAW,KAAG,IAEnE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,uBAAuB,GAAI,aAAa,WAAW,KAAG,IAElE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,wBAAwB,GAAI,aAAa,WAAW,KAAG,IAEnE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,yBAAyB,GAAI,aAAa,WAAW,KAAG,IAEpE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,wBAAwB,GAAI,aAAa,WAAW,KAAG,IAEnE,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"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type OxyServices, type BulkFollowResult } from '@oxyhq/core';
|
|
1
|
+
import { type OxyServices, type BulkFollowResult, type BulkUnfollowResult } from '@oxyhq/core';
|
|
2
2
|
/**
|
|
3
3
|
* useFollow — Hook for follow state management.
|
|
4
4
|
*
|
|
@@ -32,6 +32,7 @@ export declare const useFollow: (userId?: string | string[]) => {
|
|
|
32
32
|
fetchStatusForUser?: undefined;
|
|
33
33
|
fetchAllStatuses?: undefined;
|
|
34
34
|
followAllUsers?: undefined;
|
|
35
|
+
unfollowAllUsers?: undefined;
|
|
35
36
|
clearErrorForUser?: undefined;
|
|
36
37
|
isAnyLoading?: undefined;
|
|
37
38
|
hasAnyError?: undefined;
|
|
@@ -48,6 +49,7 @@ export declare const useFollow: (userId?: string | string[]) => {
|
|
|
48
49
|
fetchStatusForUser: (targetUserId: string) => Promise<void>;
|
|
49
50
|
fetchAllStatuses: () => Promise<void>;
|
|
50
51
|
followAllUsers: () => Promise<BulkFollowResult>;
|
|
52
|
+
unfollowAllUsers: () => Promise<BulkUnfollowResult>;
|
|
51
53
|
clearErrorForUser: (targetUserId: string) => void;
|
|
52
54
|
isAnyLoading: boolean;
|
|
53
55
|
hasAnyError: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFollow.d.ts","sourceRoot":"","sources":["../../../../../src/ui/hooks/useFollow.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useFollow.d.ts","sourceRoot":"","sources":["../../../../../src/ui/hooks/useFollow.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,gBAAgB,EAAE,KAAK,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAI/F;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,SAAS,GAAI,SAAS,MAAM,GAAG,MAAM,EAAE;;;;;iCAmFF,OAAO;;;;;;;8BAqBV,MAAM;+BAKL,MAAM;;;;;;;;;;;;;;;qBA5DR,OAAO;mBAAa,OAAO;eAAS,MAAM,GAAG,IAAI;;wCA0FhC,MAAM;2CAMT,MAAM,aAAa,OAAO;uCAIxB,MAAM;;0BAYrB,OAAO,CAAC,gBAAgB,CAAC;4BAMvB,OAAO,CAAC,kBAAkB,CAAC;sCAKrB,MAAM;;;;;;;;;;;;;;;;;;CAyC5D,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB,GAAI,QAAQ,MAAM,EAAE,aAAa,WAAW;;;;;;iCAoBzB,OAAO;;CAiBxD,CAAC;AAGF,eAAO,MAAM,iBAAiB,GAAI,QAAQ,MAAM;;;;;8BAiBD,MAAM;+BAIL,MAAM;CAYrD,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { OxyServices, BulkFollowResult } from '@oxyhq/core';
|
|
1
|
+
import type { OxyServices, BulkFollowResult, BulkUnfollowResult } from '@oxyhq/core';
|
|
2
2
|
interface FollowState {
|
|
3
3
|
followingUsers: Record<string, boolean>;
|
|
4
4
|
loadingUsers: Record<string, boolean>;
|
|
@@ -13,6 +13,7 @@ interface FollowState {
|
|
|
13
13
|
fetchFollowStatus: (userId: string, oxyServices: OxyServices) => Promise<void>;
|
|
14
14
|
toggleFollowUser: (userId: string, oxyServices: OxyServices, isCurrentlyFollowing: boolean) => Promise<void>;
|
|
15
15
|
followManyUsers: (userIds: string[], oxyServices: OxyServices) => Promise<BulkFollowResult>;
|
|
16
|
+
unfollowManyUsers: (userIds: string[], oxyServices: OxyServices) => Promise<BulkUnfollowResult>;
|
|
16
17
|
setFollowerCount: (userId: string, count: number) => void;
|
|
17
18
|
setFollowingCount: (userId: string, count: number) => void;
|
|
18
19
|
updateCountsFromFollowAction: (targetUserId: string, action: 'follow' | 'unfollow', counts: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"followStore.d.ts","sourceRoot":"","sources":["../../../../../src/ui/stores/followStore.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"followStore.d.ts","sourceRoot":"","sources":["../../../../../src/ui/stores/followStore.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAErF,UAAU,WAAW;IACnB,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACxC,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACtC,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACvC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,CAAC;IAEtC,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACvC,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAExC,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACvC,kBAAk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42
|
authWebUrl?: string;
|
|
43
43
|
authRedirectUri?: string;
|
|
44
44
|
queryClient?: QueryClient;
|
|
45
|
+
/**
|
|
46
|
+
* When `true`, skips ONLY the terminal SSO bounce in the web cold-boot
|
|
47
|
+
* chain — the force-redirect to `auth.<apex>/sso?prompt=none` that fires
|
|
48
|
+
* for a visitor with no recoverable local session. This lets a truly
|
|
49
|
+
* anonymous user keep browsing instead of being bounced to the central
|
|
50
|
+
* IdP (e.g. a marketplace that allows anonymous browsing like eBay /
|
|
51
|
+
* Shop.app).
|
|
52
|
+
*
|
|
53
|
+
* Session restore still runs in full: the callback consume, FedCM silent,
|
|
54
|
+
* first-party `/auth/silent` iframe, stored-session bearer, and
|
|
55
|
+
* cookie-restore steps all execute — so a returning signed-in user is
|
|
56
|
+
* still silently restored. Only the force-bounce for a genuinely
|
|
57
|
+
* anonymous visitor is suppressed.
|
|
58
|
+
*
|
|
59
|
+
* Default `false` (current behavior: the bounce fires).
|
|
60
|
+
*/
|
|
61
|
+
disableAutoSso?: boolean;
|
|
45
62
|
}
|
|
46
63
|
//# sourceMappingURL=navigation.d.ts.map
|
|
@@ -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,C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AMtB,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,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B;;;;;;;;;;;;;;;OAeG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;CAC5B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oxyhq/services",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.4.0",
|
|
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",
|
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
},
|
|
108
108
|
"dependencies": {
|
|
109
109
|
"@lottiefiles/dotlottie-react": "^0.13.5",
|
|
110
|
-
"@oxyhq/contracts": "^0.
|
|
110
|
+
"@oxyhq/contracts": "^0.2.0",
|
|
111
111
|
"@react-native-async-storage/async-storage": "2.2.0",
|
|
112
112
|
"@types/react": "*",
|
|
113
113
|
"copyfiles": "^2.4.1",
|
|
@@ -161,7 +161,7 @@
|
|
|
161
161
|
"peerDependencies": {
|
|
162
162
|
"@expo/vector-icons": "^15.0.3",
|
|
163
163
|
"@oxyhq/bloom": ">=0.5.0",
|
|
164
|
-
"@oxyhq/core": "^3.
|
|
164
|
+
"@oxyhq/core": "^3.6.0",
|
|
165
165
|
"@react-native-community/netinfo": "^11.4.1",
|
|
166
166
|
"@tanstack/query-async-storage-persister": "^5.100",
|
|
167
167
|
"@tanstack/query-sync-storage-persister": "^5.100",
|
|
@@ -12,7 +12,7 @@ import { useOxy } from '../context/OxyContext';
|
|
|
12
12
|
import { toast } from '@oxyhq/bloom';
|
|
13
13
|
import { useFollow, useFollowForButton } from '../hooks/useFollow';
|
|
14
14
|
import { useTheme } from '@oxyhq/bloom/theme';
|
|
15
|
-
import type { OxyServices, BulkFollowResult } from '@oxyhq/core';
|
|
15
|
+
import type { OxyServices, BulkFollowResult, BulkUnfollowResult } from '@oxyhq/core';
|
|
16
16
|
|
|
17
17
|
const DEFAULT_FOLLOW_ALL_LABEL = 'Follow all';
|
|
18
18
|
const DEFAULT_FOLLOWED_ALL_LABEL = 'Following';
|
|
@@ -43,6 +43,7 @@ export interface MultiFollowButtonProps extends FollowButtonBaseProps {
|
|
|
43
43
|
followAllLabel?: string;
|
|
44
44
|
followedAllLabel?: string;
|
|
45
45
|
onBulkFollow?: (result: BulkFollowResult) => void;
|
|
46
|
+
onBulkUnfollow?: (result: BulkUnfollowResult) => void;
|
|
46
47
|
userId?: never;
|
|
47
48
|
}
|
|
48
49
|
|
|
@@ -142,6 +143,7 @@ const FollowButtonMultiInner = memo(function FollowButtonMultiInner({
|
|
|
142
143
|
followedAllLabel = DEFAULT_FOLLOWED_ALL_LABEL,
|
|
143
144
|
onFollowChange,
|
|
144
145
|
onBulkFollow,
|
|
146
|
+
onBulkUnfollow,
|
|
145
147
|
style,
|
|
146
148
|
textStyle,
|
|
147
149
|
disabled = false,
|
|
@@ -151,6 +153,7 @@ const FollowButtonMultiInner = memo(function FollowButtonMultiInner({
|
|
|
151
153
|
const { colors } = useTheme();
|
|
152
154
|
const follow = useFollow(userIds);
|
|
153
155
|
const followAllUsers = 'followAllUsers' in follow ? follow.followAllUsers : undefined;
|
|
156
|
+
const unfollowAllUsers = 'unfollowAllUsers' in follow ? follow.unfollowAllUsers : undefined;
|
|
154
157
|
const isAnyLoading = 'isAnyLoading' in follow ? follow.isAnyLoading : false;
|
|
155
158
|
|
|
156
159
|
// `allFollowing` is store-derived (LIVE aggregate of each target's follow
|
|
@@ -180,8 +183,27 @@ const FollowButtonMultiInner = memo(function FollowButtonMultiInner({
|
|
|
180
183
|
event.preventDefault();
|
|
181
184
|
event.stopPropagation?.();
|
|
182
185
|
}
|
|
183
|
-
if (disabled || isLoading
|
|
186
|
+
if (disabled || isLoading) return;
|
|
184
187
|
|
|
188
|
+
if (allFollowing) {
|
|
189
|
+
if (!unfollowAllUsers) return;
|
|
190
|
+
setIsSubmitting(true);
|
|
191
|
+
try {
|
|
192
|
+
const result = await unfollowAllUsers();
|
|
193
|
+
// `unfollowManyUsers` flips each user to not-following in the store, so
|
|
194
|
+
// `allFollowing` becomes false reactively — no local flag.
|
|
195
|
+
onFollowChange?.(false);
|
|
196
|
+
onBulkUnfollow?.(result);
|
|
197
|
+
} catch (err: unknown) {
|
|
198
|
+
const error = err instanceof Error ? err : new Error(String(err));
|
|
199
|
+
toast.error(error.message || 'Failed to update follow status');
|
|
200
|
+
} finally {
|
|
201
|
+
setIsSubmitting(false);
|
|
202
|
+
}
|
|
203
|
+
return;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
if (!followAllUsers) return;
|
|
185
207
|
setIsSubmitting(true);
|
|
186
208
|
try {
|
|
187
209
|
const result = await followAllUsers();
|
|
@@ -203,7 +225,7 @@ const FollowButtonMultiInner = memo(function FollowButtonMultiInner({
|
|
|
203
225
|
} finally {
|
|
204
226
|
setIsSubmitting(false);
|
|
205
227
|
}
|
|
206
|
-
}, [disabled, isLoading, allFollowing, followAllUsers, onFollowChange, onBulkFollow, preventParentActions]);
|
|
228
|
+
}, [disabled, isLoading, allFollowing, followAllUsers, unfollowAllUsers, onFollowChange, onBulkFollow, onBulkUnfollow, preventParentActions]);
|
|
207
229
|
|
|
208
230
|
const baseButtonStyle = getBaseButtonStyle(size, style);
|
|
209
231
|
const baseTextStyle = getBaseTextStyle(size, textStyle);
|
|
@@ -216,7 +238,7 @@ const FollowButtonMultiInner = memo(function FollowButtonMultiInner({
|
|
|
216
238
|
}
|
|
217
239
|
style={baseButtonStyle}
|
|
218
240
|
onPress={handlePress}
|
|
219
|
-
disabled={disabled || isLoading
|
|
241
|
+
disabled={disabled || isLoading}
|
|
220
242
|
activeOpacity={0.8}
|
|
221
243
|
>
|
|
222
244
|
{showLoadingState && isLoading ? (
|
|
@@ -107,6 +107,7 @@ const OxyProvider: FC<OxyProviderProps> = ({
|
|
|
107
107
|
baseURL,
|
|
108
108
|
authWebUrl,
|
|
109
109
|
authRedirectUri,
|
|
110
|
+
disableAutoSso,
|
|
110
111
|
queryClient: providedQueryClient,
|
|
111
112
|
}) => {
|
|
112
113
|
|
|
@@ -298,6 +299,7 @@ const OxyProvider: FC<OxyProviderProps> = ({
|
|
|
298
299
|
authRedirectUri={authRedirectUri}
|
|
299
300
|
storageKeyPrefix={storageKeyPrefix}
|
|
300
301
|
clientId={clientId}
|
|
302
|
+
disableAutoSso={disableAutoSso}
|
|
301
303
|
onAuthStateChange={onAuthStateChange as OxyContextProviderProps['onAuthStateChange']}
|
|
302
304
|
>
|
|
303
305
|
{children}
|
|
@@ -161,6 +161,16 @@ export interface OxyContextProviderProps {
|
|
|
161
161
|
* for the cross-app device sign-in flow. See {@link OxyContextState.clientId}.
|
|
162
162
|
*/
|
|
163
163
|
clientId?: string;
|
|
164
|
+
/**
|
|
165
|
+
* When `true`, skips ONLY the terminal `sso-bounce` cold-boot step — the
|
|
166
|
+
* force-redirect to `auth.<apex>/sso?prompt=none` that fires for a visitor
|
|
167
|
+
* with no recoverable local session. Every other cold-boot step still runs
|
|
168
|
+
* (callback consume, FedCM silent, `/auth/silent` iframe, stored-session,
|
|
169
|
+
* cookie-restore), so a returning signed-in user is still silently
|
|
170
|
+
* restored; only the bounce for a truly anonymous visitor is suppressed.
|
|
171
|
+
* Default `false`.
|
|
172
|
+
*/
|
|
173
|
+
disableAutoSso?: boolean;
|
|
164
174
|
onAuthStateChange?: (user: User | null) => void;
|
|
165
175
|
onError?: (error: ApiError) => void;
|
|
166
176
|
}
|
|
@@ -254,6 +264,39 @@ const COOKIE_RESTORE_TIMEOUT = 3000;
|
|
|
254
264
|
*/
|
|
255
265
|
const COLD_BOOT_OVERALL_DEADLINE = 20000;
|
|
256
266
|
|
|
267
|
+
/**
|
|
268
|
+
* Per-session timeout (ms) for the parallel stored-session validation in
|
|
269
|
+
* `restoreStoredSession`. Each `validateSession` call races against this timer
|
|
270
|
+
* so a single slow/offline session never blocks the whole startup validation
|
|
271
|
+
* sweep — sessions that don't answer in time resolve to `null` (treated as
|
|
272
|
+
* unvalidated) and the remaining sessions still settle.
|
|
273
|
+
*/
|
|
274
|
+
const VALIDATION_TIMEOUT = 8000;
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* Fallback client-session validity window (ms) — 7 days — applied when a
|
|
278
|
+
* restored account/session does not carry an explicit `expiresAt`. This is only
|
|
279
|
+
* a local display/bookkeeping hint for the multi-session store; the server
|
|
280
|
+
* remains the source of truth for actual session expiry. Used in the refresh
|
|
281
|
+
* cookie restore, stored-session restore, and web-SSO session paths.
|
|
282
|
+
*/
|
|
283
|
+
const DEFAULT_SESSION_VALIDITY_MS = 7 * 24 * 60 * 60 * 1000;
|
|
284
|
+
|
|
285
|
+
/**
|
|
286
|
+
* Minimum interval (ms) between visibility-driven IdP `/auth/session-check`
|
|
287
|
+
* probes. Debounces the hidden-iframe session check so rapid tab focus/blur
|
|
288
|
+
* cycles can't spawn a check-iframe storm; at most one probe runs per window.
|
|
289
|
+
*/
|
|
290
|
+
const IDP_SESSION_CHECK_COOLDOWN = 30000;
|
|
291
|
+
|
|
292
|
+
/**
|
|
293
|
+
* Hard timeout (ms) for a single visibility-driven IdP `/auth/session-check`
|
|
294
|
+
* iframe. If the IdP never posts a `oxy-session-check` message back, the iframe
|
|
295
|
+
* and its listener are torn down after this budget so a non-responsive check
|
|
296
|
+
* can never leak an iframe or a `message` listener.
|
|
297
|
+
*/
|
|
298
|
+
const IDP_SESSION_CHECK_TIMEOUT = 5000;
|
|
299
|
+
|
|
257
300
|
function getHttpStatus(error: unknown): number | undefined {
|
|
258
301
|
if (!error || typeof error !== 'object') {
|
|
259
302
|
return undefined;
|
|
@@ -367,6 +410,7 @@ export const OxyProvider: React.FC<OxyContextProviderProps> = ({
|
|
|
367
410
|
authRedirectUri,
|
|
368
411
|
storageKeyPrefix = 'oxy_session',
|
|
369
412
|
clientId: clientIdProp,
|
|
413
|
+
disableAutoSso = false,
|
|
370
414
|
onAuthStateChange,
|
|
371
415
|
onError,
|
|
372
416
|
}) => {
|
|
@@ -849,7 +893,7 @@ export const OxyProvider: React.FC<OxyContextProviderProps> = ({
|
|
|
849
893
|
const clientSessions: ClientSession[] = snapshot.accounts.map((account) => ({
|
|
850
894
|
sessionId: account.sessionId,
|
|
851
895
|
deviceId: '',
|
|
852
|
-
expiresAt: account.expiresAt || new Date(now.getTime() +
|
|
896
|
+
expiresAt: account.expiresAt || new Date(now.getTime() + DEFAULT_SESSION_VALIDITY_MS).toISOString(),
|
|
853
897
|
lastActive: now.toISOString(),
|
|
854
898
|
userId: account.user?.id,
|
|
855
899
|
isCurrent: account.sessionId === activeAccount.sessionId,
|
|
@@ -906,9 +950,8 @@ export const OxyProvider: React.FC<OxyContextProviderProps> = ({
|
|
|
906
950
|
let validSessions: ClientSession[] = [];
|
|
907
951
|
|
|
908
952
|
if (storedSessionIds.length > 0) {
|
|
909
|
-
// Validate all sessions in parallel (with
|
|
953
|
+
// Validate all sessions in parallel (with a per-session timeout) to avoid
|
|
910
954
|
// sequential blocking that freezes the app on startup
|
|
911
|
-
const VALIDATION_TIMEOUT = 8000;
|
|
912
955
|
const results = await Promise.allSettled(
|
|
913
956
|
storedSessionIds.map(async (sessionId) => {
|
|
914
957
|
const timeoutPromise = new Promise<null>((resolve) =>
|
|
@@ -931,7 +974,7 @@ export const OxyProvider: React.FC<OxyContextProviderProps> = ({
|
|
|
931
974
|
const clientSession: ClientSession = {
|
|
932
975
|
sessionId,
|
|
933
976
|
deviceId: '',
|
|
934
|
-
expiresAt: new Date(now.getTime() +
|
|
977
|
+
expiresAt: new Date(now.getTime() + DEFAULT_SESSION_VALIDITY_MS).toISOString(),
|
|
935
978
|
lastActive: now.toISOString(),
|
|
936
979
|
userId: validation.user.id?.toString() ?? '',
|
|
937
980
|
isCurrent: sessionId === storedActiveSessionId,
|
|
@@ -1241,6 +1284,13 @@ export const OxyProvider: React.FC<OxyContextProviderProps> = ({
|
|
|
1241
1284
|
// still active (loop + self-heal protection).
|
|
1242
1285
|
id: 'sso-bounce',
|
|
1243
1286
|
enabled: () => {
|
|
1287
|
+
// Opt-out: when the consumer disabled auto-SSO, never bounce a
|
|
1288
|
+
// truly-anonymous visitor to the central IdP. All other restore
|
|
1289
|
+
// steps already ran above, so a signed-in user is still
|
|
1290
|
+
// recovered; only this terminal force-bounce is suppressed.
|
|
1291
|
+
if (disableAutoSso) {
|
|
1292
|
+
return false;
|
|
1293
|
+
}
|
|
1244
1294
|
if (!isWebBrowser() || window.top !== window.self) {
|
|
1245
1295
|
return false;
|
|
1246
1296
|
}
|
|
@@ -1335,6 +1385,7 @@ export const OxyProvider: React.FC<OxyContextProviderProps> = ({
|
|
|
1335
1385
|
restoreStoredSession,
|
|
1336
1386
|
runSsoReturn,
|
|
1337
1387
|
markAuthResolved,
|
|
1388
|
+
disableAutoSso,
|
|
1338
1389
|
]);
|
|
1339
1390
|
|
|
1340
1391
|
useEffect(() => {
|
|
@@ -1456,7 +1507,7 @@ export const OxyProvider: React.FC<OxyContextProviderProps> = ({
|
|
|
1456
1507
|
const clientSession = {
|
|
1457
1508
|
sessionId: session.sessionId,
|
|
1458
1509
|
deviceId: session.deviceId || '',
|
|
1459
|
-
expiresAt: session.expiresAt || new Date(Date.now() +
|
|
1510
|
+
expiresAt: session.expiresAt || new Date(Date.now() + DEFAULT_SESSION_VALIDITY_MS).toISOString(),
|
|
1460
1511
|
lastActive: new Date().toISOString(),
|
|
1461
1512
|
userId: session.user.id?.toString() ?? '',
|
|
1462
1513
|
isCurrent: true,
|
|
@@ -1550,9 +1601,9 @@ export const OxyProvider: React.FC<OxyContextProviderProps> = ({
|
|
|
1550
1601
|
const idpOrigin = resolvedAuthWebUrl || 'https://auth.oxy.so';
|
|
1551
1602
|
|
|
1552
1603
|
const checkIdPSession = () => {
|
|
1553
|
-
// Debounce: check at most once per
|
|
1604
|
+
// Debounce: check at most once per cooldown window
|
|
1554
1605
|
const now = Date.now();
|
|
1555
|
-
if (now - lastIdPCheckRef.current <
|
|
1606
|
+
if (now - lastIdPCheckRef.current < IDP_SESSION_CHECK_COOLDOWN) return;
|
|
1556
1607
|
lastIdPCheckRef.current = now;
|
|
1557
1608
|
|
|
1558
1609
|
// Clean up any in-flight check before starting a new one
|
|
@@ -1591,7 +1642,7 @@ export const OxyProvider: React.FC<OxyContextProviderProps> = ({
|
|
|
1591
1642
|
|
|
1592
1643
|
window.addEventListener('message', handleMessage);
|
|
1593
1644
|
document.body.appendChild(iframe);
|
|
1594
|
-
setTimeout(cleanup,
|
|
1645
|
+
setTimeout(cleanup, IDP_SESSION_CHECK_TIMEOUT);
|
|
1595
1646
|
pendingIdPCleanupRef.current = cleanup;
|
|
1596
1647
|
};
|
|
1597
1648
|
|
|
@@ -80,6 +80,12 @@ export const queryKeys = {
|
|
|
80
80
|
list: () => [...queryKeys.connectedApps.all, 'list'] as const,
|
|
81
81
|
},
|
|
82
82
|
|
|
83
|
+
// Follow / social graph queries
|
|
84
|
+
follow: {
|
|
85
|
+
all: ['follow'] as const,
|
|
86
|
+
counts: (userId: string) => [...queryKeys.follow.all, 'counts', userId] as const,
|
|
87
|
+
},
|
|
88
|
+
|
|
83
89
|
// Payment / wallet / subscription queries
|
|
84
90
|
payments: {
|
|
85
91
|
all: ['payments'] as const,
|