@oxyhq/services 25.0.1 → 26.0.1
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/README.md +2 -2
- package/android/src/main/java/so/oxy/identity/OxyIdentityStore.kt +127 -21
- package/expo-module.config.json +1 -4
- package/lib/commonjs/index.js +49 -18
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/notifications/deviceNotifications.js +0 -63
- package/lib/commonjs/notifications/deviceNotifications.js.map +1 -1
- package/lib/commonjs/ui/boot/runProviderColdBoot.js +64 -20
- package/lib/commonjs/ui/boot/runProviderColdBoot.js.map +1 -1
- package/lib/commonjs/ui/components/FollowButton.js +4 -4
- package/lib/commonjs/ui/components/FollowButton.js.map +1 -1
- package/lib/commonjs/ui/components/OxyAccountDialogScreen.js +1 -13
- package/lib/commonjs/ui/components/OxyAccountDialogScreen.js.map +1 -1
- package/lib/commonjs/ui/components/OxyAuthChooser.js +8 -9
- package/lib/commonjs/ui/components/OxyAuthChooser.js.map +1 -1
- package/lib/commonjs/ui/components/OxyProvider.js +7 -8
- package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
- package/lib/commonjs/ui/components/ProfileButton.js +1 -1
- package/lib/commonjs/ui/components/ProfileButton.js.map +1 -1
- package/lib/commonjs/ui/components/authChooser/AccountsMenuView.js +30 -25
- package/lib/commonjs/ui/components/authChooser/AccountsMenuView.js.map +1 -1
- package/lib/commonjs/ui/components/authChooser/primitives.js +9 -9
- package/lib/commonjs/ui/components/authChooser/primitives.js.map +1 -1
- package/lib/commonjs/ui/components/authChooser/useUsernameAvailability.js +2 -2
- package/lib/commonjs/ui/components/authChooser/useUsernameAvailability.js.map +1 -1
- package/lib/commonjs/ui/components/fileManagement/UploadPreview.js +2 -2
- package/lib/commonjs/ui/components/fileManagement/UploadPreview.js.map +1 -1
- package/lib/commonjs/ui/components/internal/PinInput.js +1 -3
- package/lib/commonjs/ui/components/internal/PinInput.js.map +1 -1
- package/lib/commonjs/ui/components/logo/LogoText.js +4 -4
- package/lib/commonjs/ui/components/logo/LogoText.js.map +1 -1
- package/lib/commonjs/ui/components/payment/PaymentDetailsStep.js +2 -2
- package/lib/commonjs/ui/components/payment/PaymentDetailsStep.js.map +1 -1
- package/lib/commonjs/ui/components/payment/PaymentSummaryStep.js +2 -2
- package/lib/commonjs/ui/components/payment/PaymentSummaryStep.js.map +1 -1
- package/lib/commonjs/ui/components/styles/shadow.js.map +1 -1
- package/lib/commonjs/ui/context/OxyContext.js +46 -32
- package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
- package/lib/commonjs/ui/context/commitSessionFlow.js +43 -3
- package/lib/commonjs/ui/context/commitSessionFlow.js.map +1 -1
- package/lib/commonjs/ui/context/hooks/useAuthOperations.js +2 -15
- package/lib/commonjs/ui/context/hooks/useAuthOperations.js.map +1 -1
- package/lib/commonjs/ui/context/useOxyAccountGraph.js +4 -3
- package/lib/commonjs/ui/context/useOxyAccountGraph.js.map +1 -1
- package/lib/commonjs/ui/hooks/mutations/mutationFactory.js +5 -5
- package/lib/commonjs/ui/hooks/mutations/mutationFactory.js.map +1 -1
- package/lib/commonjs/ui/hooks/mutations/useAccountMutations.js +11 -11
- package/lib/commonjs/ui/hooks/mutations/useAccountMutations.js.map +1 -1
- package/lib/commonjs/ui/hooks/mutations/useServicesMutations.js +9 -9
- package/lib/commonjs/ui/hooks/mutations/useServicesMutations.js.map +1 -1
- package/lib/commonjs/ui/hooks/queries/usePaymentQueries.js +2 -3
- package/lib/commonjs/ui/hooks/queries/usePaymentQueries.js.map +1 -1
- package/lib/commonjs/ui/hooks/queries/userCache.js +17 -17
- package/lib/commonjs/ui/hooks/queries/userCache.js.map +1 -1
- package/lib/commonjs/ui/hooks/useAssets.js.map +1 -1
- package/lib/commonjs/ui/hooks/useAsyncAction.js +7 -7
- package/lib/commonjs/ui/hooks/useAsyncAction.js.map +1 -1
- package/lib/commonjs/ui/hooks/useAuth.js +2 -4
- package/lib/commonjs/ui/hooks/useAuth.js.map +1 -1
- package/lib/commonjs/ui/hooks/useAvatarPicker.js +5 -5
- package/lib/commonjs/ui/hooks/useAvatarPicker.js.map +1 -1
- package/lib/commonjs/ui/hooks/useOnlineStatus.js +2 -3
- package/lib/commonjs/ui/hooks/useOnlineStatus.js.map +1 -1
- package/lib/commonjs/ui/hooks/useSessionManagement.js +2 -0
- package/lib/commonjs/ui/hooks/useSessionManagement.js.map +1 -1
- package/lib/commonjs/ui/hooks/useSettingToggle.js +4 -4
- package/lib/commonjs/ui/hooks/useSettingToggle.js.map +1 -1
- package/lib/commonjs/ui/hooks/useSurfaceHeader.js +11 -68
- package/lib/commonjs/ui/hooks/useSurfaceHeader.js.map +1 -1
- package/lib/commonjs/ui/oauth/browserAuthTransport.js +64 -66
- package/lib/commonjs/ui/oauth/browserAuthTransport.js.map +1 -1
- package/lib/commonjs/ui/oauth/legacyRedirectLanes.js +48 -0
- package/lib/commonjs/ui/oauth/legacyRedirectLanes.js.map +1 -0
- package/lib/commonjs/ui/oauth/oauthPopup.js +0 -47
- package/lib/commonjs/ui/oauth/oauthPopup.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountMembersScreen.js +10 -10
- package/lib/commonjs/ui/screens/AccountMembersScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js +8 -7
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountVerificationScreen.js +4 -4
- package/lib/commonjs/ui/screens/AccountVerificationScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AppInfoScreen.js +9 -9
- package/lib/commonjs/ui/screens/AppInfoScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AvatarCropScreen.js +3 -3
- package/lib/commonjs/ui/screens/AvatarCropScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ChangeAvatarScreen.js +7 -6
- package/lib/commonjs/ui/screens/ChangeAvatarScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ConnectedAppsScreen.js +4 -4
- package/lib/commonjs/ui/screens/ConnectedAppsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/CreateAccountScreen.js +3 -3
- package/lib/commonjs/ui/screens/CreateAccountScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/EditProfileFieldScreen.js +3 -3
- package/lib/commonjs/ui/screens/EditProfileFieldScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/EditProfileScreen.js +3 -2
- package/lib/commonjs/ui/screens/EditProfileScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FAQScreen.js +2 -2
- package/lib/commonjs/ui/screens/FAQScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FeedbackScreen.js +89 -90
- package/lib/commonjs/ui/screens/FeedbackScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FileManagementScreen.js +20 -20
- package/lib/commonjs/ui/screens/FileManagementScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FollowersListScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FollowingListScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/HelpSupportScreen.js +7 -7
- package/lib/commonjs/ui/screens/HelpSupportScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/HistoryViewScreen.js +34 -9
- package/lib/commonjs/ui/screens/HistoryViewScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/LanguageSelectorScreen.js +3 -3
- package/lib/commonjs/ui/screens/LanguageSelectorScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/LegalDocumentsScreen.js +3 -3
- package/lib/commonjs/ui/screens/LegalDocumentsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ManageAccountScreen.js +15 -15
- package/lib/commonjs/ui/screens/ManageAccountScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js +19 -19
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PrivacySettingsScreen.js +15 -15
- package/lib/commonjs/ui/screens/PrivacySettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ProfileScreen.js +7 -17
- package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SavesCollectionsScreen.js +2 -2
- package/lib/commonjs/ui/screens/SavesCollectionsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/UserListScreen.js +7 -13
- package/lib/commonjs/ui/screens/UserListScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js +6 -5
- package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/fileManagement/PhotoPickerSection.js +4 -1
- package/lib/commonjs/ui/screens/fileManagement/PhotoPickerSection.js.map +1 -1
- package/lib/commonjs/ui/screens/fileManagement/hooks/useFileUploadState.js +24 -34
- package/lib/commonjs/ui/screens/fileManagement/hooks/useFileUploadState.js.map +1 -1
- package/lib/commonjs/ui/screens/trust/TrustCenterScreen.js +1 -1
- package/lib/commonjs/ui/screens/trust/TrustCenterScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/trust/TrustLeaderboardScreen.js +4 -3
- package/lib/commonjs/ui/screens/trust/TrustLeaderboardScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/trust/TrustRewardsScreen.js +1 -1
- package/lib/commonjs/ui/screens/trust/TrustRewardsScreen.js.map +1 -1
- package/lib/commonjs/ui/session/index.js +0 -7
- package/lib/commonjs/ui/session/index.js.map +1 -1
- package/lib/commonjs/ui/utils/crossOriginRestore.js +140 -0
- package/lib/commonjs/ui/utils/crossOriginRestore.js.map +1 -0
- package/lib/commonjs/ui/utils/fileManagement.js +24 -24
- package/lib/commonjs/ui/utils/fileManagement.js.map +1 -1
- package/lib/commonjs/ui/utils/oauthReturn.js +30 -19
- package/lib/commonjs/ui/utils/oauthReturn.js.map +1 -1
- package/lib/commonjs/ui/utils/userUtils.js +28 -27
- package/lib/commonjs/ui/utils/userUtils.js.map +1 -1
- package/lib/module/index.js +8 -20
- package/lib/module/index.js.map +1 -1
- package/lib/module/notifications/deviceNotifications.js +0 -62
- package/lib/module/notifications/deviceNotifications.js.map +1 -1
- package/lib/module/ui/boot/runProviderColdBoot.js +65 -21
- package/lib/module/ui/boot/runProviderColdBoot.js.map +1 -1
- package/lib/module/ui/components/FollowButton.js +1 -1
- package/lib/module/ui/components/FollowButton.js.map +1 -1
- package/lib/module/ui/components/OxyAccountDialogScreen.js +1 -13
- package/lib/module/ui/components/OxyAccountDialogScreen.js.map +1 -1
- package/lib/module/ui/components/OxyAuthChooser.js +4 -5
- package/lib/module/ui/components/OxyAuthChooser.js.map +1 -1
- package/lib/module/ui/components/OxyProvider.js +6 -7
- package/lib/module/ui/components/OxyProvider.js.map +1 -1
- package/lib/module/ui/components/ProfileButton.js +2 -2
- package/lib/module/ui/components/ProfileButton.js.map +1 -1
- package/lib/module/ui/components/authChooser/AccountsMenuView.js +8 -3
- package/lib/module/ui/components/authChooser/AccountsMenuView.js.map +1 -1
- package/lib/module/ui/components/authChooser/primitives.js +1 -1
- package/lib/module/ui/components/authChooser/primitives.js.map +1 -1
- package/lib/module/ui/components/authChooser/useUsernameAvailability.js +1 -1
- package/lib/module/ui/components/authChooser/useUsernameAvailability.js.map +1 -1
- package/lib/module/ui/components/fileManagement/UploadPreview.js +1 -1
- package/lib/module/ui/components/fileManagement/UploadPreview.js.map +1 -1
- package/lib/module/ui/components/internal/PinInput.js +1 -3
- package/lib/module/ui/components/internal/PinInput.js.map +1 -1
- package/lib/module/ui/components/logo/LogoText.js +4 -4
- package/lib/module/ui/components/logo/LogoText.js.map +1 -1
- package/lib/module/ui/components/payment/PaymentDetailsStep.js +1 -1
- package/lib/module/ui/components/payment/PaymentDetailsStep.js.map +1 -1
- package/lib/module/ui/components/payment/PaymentSummaryStep.js +2 -2
- package/lib/module/ui/components/payment/PaymentSummaryStep.js.map +1 -1
- package/lib/module/ui/components/styles/shadow.js.map +1 -1
- package/lib/module/ui/context/OxyContext.js +49 -35
- package/lib/module/ui/context/OxyContext.js.map +1 -1
- package/lib/module/ui/context/commitSessionFlow.js +42 -3
- package/lib/module/ui/context/commitSessionFlow.js.map +1 -1
- package/lib/module/ui/context/hooks/useAuthOperations.js +2 -15
- package/lib/module/ui/context/hooks/useAuthOperations.js.map +1 -1
- package/lib/module/ui/context/useOxyAccountGraph.js +4 -3
- package/lib/module/ui/context/useOxyAccountGraph.js.map +1 -1
- package/lib/module/ui/hooks/mutations/mutationFactory.js +1 -1
- package/lib/module/ui/hooks/mutations/mutationFactory.js.map +1 -1
- package/lib/module/ui/hooks/mutations/useAccountMutations.js +1 -1
- package/lib/module/ui/hooks/mutations/useAccountMutations.js.map +1 -1
- package/lib/module/ui/hooks/mutations/useServicesMutations.js +1 -1
- package/lib/module/ui/hooks/mutations/useServicesMutations.js.map +1 -1
- package/lib/module/ui/hooks/queries/usePaymentQueries.js +2 -3
- package/lib/module/ui/hooks/queries/usePaymentQueries.js.map +1 -1
- package/lib/module/ui/hooks/queries/userCache.js +17 -17
- package/lib/module/ui/hooks/queries/userCache.js.map +1 -1
- package/lib/module/ui/hooks/useAssets.js.map +1 -1
- package/lib/module/ui/hooks/useAsyncAction.js +1 -1
- package/lib/module/ui/hooks/useAsyncAction.js.map +1 -1
- package/lib/module/ui/hooks/useAuth.js +2 -4
- package/lib/module/ui/hooks/useAuth.js.map +1 -1
- package/lib/module/ui/hooks/useAvatarPicker.js +1 -1
- package/lib/module/ui/hooks/useAvatarPicker.js.map +1 -1
- package/lib/module/ui/hooks/useOnlineStatus.js +2 -3
- package/lib/module/ui/hooks/useOnlineStatus.js.map +1 -1
- package/lib/module/ui/hooks/useSessionManagement.js +2 -0
- package/lib/module/ui/hooks/useSessionManagement.js.map +1 -1
- package/lib/module/ui/hooks/useSettingToggle.js +1 -1
- package/lib/module/ui/hooks/useSettingToggle.js.map +1 -1
- package/lib/module/ui/hooks/useSurfaceHeader.js +11 -68
- package/lib/module/ui/hooks/useSurfaceHeader.js.map +1 -1
- package/lib/module/ui/oauth/browserAuthTransport.js +64 -66
- package/lib/module/ui/oauth/browserAuthTransport.js.map +1 -1
- package/lib/module/ui/oauth/legacyRedirectLanes.js +44 -0
- package/lib/module/ui/oauth/legacyRedirectLanes.js.map +1 -0
- package/lib/module/ui/oauth/oauthPopup.js +1 -48
- package/lib/module/ui/oauth/oauthPopup.js.map +1 -1
- package/lib/module/ui/screens/AccountMembersScreen.js +1 -1
- package/lib/module/ui/screens/AccountMembersScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountSettingsScreen.js +4 -3
- package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountVerificationScreen.js +1 -1
- package/lib/module/ui/screens/AccountVerificationScreen.js.map +1 -1
- package/lib/module/ui/screens/AppInfoScreen.js +1 -1
- package/lib/module/ui/screens/AppInfoScreen.js.map +1 -1
- package/lib/module/ui/screens/AvatarCropScreen.js +1 -1
- package/lib/module/ui/screens/AvatarCropScreen.js.map +1 -1
- package/lib/module/ui/screens/ChangeAvatarScreen.js +5 -4
- package/lib/module/ui/screens/ChangeAvatarScreen.js.map +1 -1
- package/lib/module/ui/screens/ConnectedAppsScreen.js +2 -2
- package/lib/module/ui/screens/ConnectedAppsScreen.js.map +1 -1
- package/lib/module/ui/screens/CreateAccountScreen.js +1 -1
- package/lib/module/ui/screens/CreateAccountScreen.js.map +1 -1
- package/lib/module/ui/screens/EditProfileFieldScreen.js +1 -1
- package/lib/module/ui/screens/EditProfileFieldScreen.js.map +1 -1
- package/lib/module/ui/screens/EditProfileScreen.js +4 -3
- package/lib/module/ui/screens/EditProfileScreen.js.map +1 -1
- package/lib/module/ui/screens/FAQScreen.js +1 -1
- package/lib/module/ui/screens/FAQScreen.js.map +1 -1
- package/lib/module/ui/screens/FeedbackScreen.js +91 -94
- package/lib/module/ui/screens/FeedbackScreen.js.map +1 -1
- package/lib/module/ui/screens/FileManagementScreen.js +1 -1
- package/lib/module/ui/screens/FileManagementScreen.js.map +1 -1
- package/lib/module/ui/screens/FollowersListScreen.js.map +1 -1
- package/lib/module/ui/screens/FollowingListScreen.js.map +1 -1
- package/lib/module/ui/screens/HelpSupportScreen.js +1 -1
- package/lib/module/ui/screens/HelpSupportScreen.js.map +1 -1
- package/lib/module/ui/screens/HistoryViewScreen.js +30 -5
- package/lib/module/ui/screens/HistoryViewScreen.js.map +1 -1
- package/lib/module/ui/screens/LanguageSelectorScreen.js +1 -1
- package/lib/module/ui/screens/LanguageSelectorScreen.js.map +1 -1
- package/lib/module/ui/screens/LegalDocumentsScreen.js +1 -1
- package/lib/module/ui/screens/LegalDocumentsScreen.js.map +1 -1
- package/lib/module/ui/screens/ManageAccountScreen.js +3 -3
- package/lib/module/ui/screens/ManageAccountScreen.js.map +1 -1
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js +4 -4
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
- package/lib/module/ui/screens/PrivacySettingsScreen.js +11 -11
- package/lib/module/ui/screens/PrivacySettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/ProfileScreen.js +8 -18
- package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/module/ui/screens/SavesCollectionsScreen.js +1 -1
- package/lib/module/ui/screens/SavesCollectionsScreen.js.map +1 -1
- package/lib/module/ui/screens/UserListScreen.js +8 -14
- package/lib/module/ui/screens/UserListScreen.js.map +1 -1
- package/lib/module/ui/screens/WelcomeNewUserScreen.js +6 -5
- package/lib/module/ui/screens/WelcomeNewUserScreen.js.map +1 -1
- package/lib/module/ui/screens/fileManagement/PhotoPickerSection.js +4 -1
- package/lib/module/ui/screens/fileManagement/PhotoPickerSection.js.map +1 -1
- package/lib/module/ui/screens/fileManagement/hooks/useFileUploadState.js +5 -15
- package/lib/module/ui/screens/fileManagement/hooks/useFileUploadState.js.map +1 -1
- package/lib/module/ui/screens/trust/TrustCenterScreen.js +1 -1
- package/lib/module/ui/screens/trust/TrustCenterScreen.js.map +1 -1
- package/lib/module/ui/screens/trust/TrustLeaderboardScreen.js +5 -4
- package/lib/module/ui/screens/trust/TrustLeaderboardScreen.js.map +1 -1
- package/lib/module/ui/screens/trust/TrustRewardsScreen.js +1 -1
- package/lib/module/ui/screens/trust/TrustRewardsScreen.js.map +1 -1
- package/lib/module/ui/session/index.js +0 -1
- package/lib/module/ui/session/index.js.map +1 -1
- package/lib/module/ui/utils/crossOriginRestore.js +131 -0
- package/lib/module/ui/utils/crossOriginRestore.js.map +1 -0
- package/lib/module/ui/utils/fileManagement.js +25 -25
- package/lib/module/ui/utils/fileManagement.js.map +1 -1
- package/lib/module/ui/utils/oauthReturn.js +30 -20
- package/lib/module/ui/utils/oauthReturn.js.map +1 -1
- package/lib/module/ui/utils/userUtils.js +28 -27
- package/lib/module/ui/utils/userUtils.js.map +1 -1
- package/lib/typescript/commonjs/index.d.ts +2 -0
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/notifications/deviceNotifications.d.ts +0 -51
- package/lib/typescript/commonjs/notifications/deviceNotifications.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/boot/runProviderColdBoot.d.ts +30 -11
- package/lib/typescript/commonjs/ui/boot/runProviderColdBoot.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/OxyAccountDialogScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/OxyAuthChooser.d.ts +0 -7
- package/lib/typescript/commonjs/ui/components/OxyAuthChooser.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/ProfileButton.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/authChooser/AccountsMenuView.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/authChooser/primitives.d.ts +1 -1
- package/lib/typescript/commonjs/ui/components/authChooser/primitives.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/fileManagement/UploadPreview.d.ts +1 -1
- package/lib/typescript/commonjs/ui/components/fileManagement/UploadPreview.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/internal/PinInput.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/payment/types.d.ts +6 -6
- package/lib/typescript/commonjs/ui/components/payment/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/commitSessionFlow.d.ts +40 -0
- package/lib/typescript/commonjs/ui/context/commitSessionFlow.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/hooks/useAuthOperations.d.ts +2 -11
- package/lib/typescript/commonjs/ui/context/hooks/useAuthOperations.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/oxyContextTypes.d.ts +7 -26
- package/lib/typescript/commonjs/ui/context/oxyContextTypes.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/mutations/useAccountMutations.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/queries/paymentTypes.d.ts +2 -3
- package/lib/typescript/commonjs/ui/hooks/queries/paymentTypes.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/queries/usePaymentQueries.d.ts +2 -3
- package/lib/typescript/commonjs/ui/hooks/queries/usePaymentQueries.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/queries/userCache.d.ts +2 -2
- package/lib/typescript/commonjs/ui/hooks/queries/userCache.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useAssets.d.ts +1 -1
- package/lib/typescript/commonjs/ui/hooks/useAssets.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useAsyncAction.d.ts +2 -2
- package/lib/typescript/commonjs/ui/hooks/useAsyncAction.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useAuth.d.ts +2 -4
- package/lib/typescript/commonjs/ui/hooks/useAuth.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useOnlineStatus.d.ts +2 -3
- package/lib/typescript/commonjs/ui/hooks/useOnlineStatus.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useSessionManagement.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useSurfaceHeader.d.ts +2 -7
- package/lib/typescript/commonjs/ui/hooks/useSurfaceHeader.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/oauth/browserAuthTransport.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/oauth/legacyRedirectLanes.d.ts +40 -0
- package/lib/typescript/commonjs/ui/oauth/legacyRedirectLanes.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/oauth/oauthPopup.d.ts +0 -6
- package/lib/typescript/commonjs/ui/oauth/oauthPopup.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/ChangeAvatarScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/EditProfileScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/FeedbackScreen.d.ts +2 -2
- package/lib/typescript/commonjs/ui/screens/FeedbackScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/FollowersListScreen.d.ts +0 -3
- package/lib/typescript/commonjs/ui/screens/FollowersListScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/FollowingListScreen.d.ts +0 -3
- package/lib/typescript/commonjs/ui/screens/FollowingListScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/HistoryViewScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/ManageAccountScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/ProfileScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/UserListScreen.d.ts +0 -7
- package/lib/typescript/commonjs/ui/screens/UserListScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/WelcomeNewUserScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/fileManagement/hooks/useFileUploadState.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/trust/TrustLeaderboardScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/trust/trustTier.d.ts +1 -1
- package/lib/typescript/commonjs/ui/screens/trust/trustTier.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/session/index.d.ts +0 -1
- package/lib/typescript/commonjs/ui/session/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/types/navigation.d.ts +19 -27
- package/lib/typescript/commonjs/ui/types/navigation.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/utils/crossOriginRestore.d.ts +43 -0
- package/lib/typescript/commonjs/ui/utils/crossOriginRestore.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/utils/fileManagement.d.ts +5 -5
- package/lib/typescript/commonjs/ui/utils/fileManagement.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/utils/oauthReturn.d.ts +12 -15
- package/lib/typescript/commonjs/ui/utils/oauthReturn.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/utils/userUtils.d.ts +14 -7
- package/lib/typescript/commonjs/ui/utils/userUtils.d.ts.map +1 -1
- package/lib/typescript/module/index.d.ts +2 -0
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/lib/typescript/module/notifications/deviceNotifications.d.ts +0 -51
- package/lib/typescript/module/notifications/deviceNotifications.d.ts.map +1 -1
- package/lib/typescript/module/ui/boot/runProviderColdBoot.d.ts +30 -11
- package/lib/typescript/module/ui/boot/runProviderColdBoot.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/OxyAccountDialogScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/OxyAuthChooser.d.ts +0 -7
- package/lib/typescript/module/ui/components/OxyAuthChooser.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/ProfileButton.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/authChooser/AccountsMenuView.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/authChooser/primitives.d.ts +1 -1
- package/lib/typescript/module/ui/components/authChooser/primitives.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/fileManagement/UploadPreview.d.ts +1 -1
- package/lib/typescript/module/ui/components/fileManagement/UploadPreview.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/internal/PinInput.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/payment/types.d.ts +6 -6
- package/lib/typescript/module/ui/components/payment/types.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/commitSessionFlow.d.ts +40 -0
- package/lib/typescript/module/ui/context/commitSessionFlow.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/hooks/useAuthOperations.d.ts +2 -11
- package/lib/typescript/module/ui/context/hooks/useAuthOperations.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/oxyContextTypes.d.ts +7 -26
- package/lib/typescript/module/ui/context/oxyContextTypes.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/mutations/useAccountMutations.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/queries/paymentTypes.d.ts +2 -3
- package/lib/typescript/module/ui/hooks/queries/paymentTypes.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/queries/usePaymentQueries.d.ts +2 -3
- package/lib/typescript/module/ui/hooks/queries/usePaymentQueries.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/queries/userCache.d.ts +2 -2
- package/lib/typescript/module/ui/hooks/queries/userCache.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useAssets.d.ts +1 -1
- package/lib/typescript/module/ui/hooks/useAssets.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useAsyncAction.d.ts +2 -2
- package/lib/typescript/module/ui/hooks/useAsyncAction.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useAuth.d.ts +2 -4
- package/lib/typescript/module/ui/hooks/useAuth.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useOnlineStatus.d.ts +2 -3
- package/lib/typescript/module/ui/hooks/useOnlineStatus.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useSessionManagement.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useSurfaceHeader.d.ts +2 -7
- package/lib/typescript/module/ui/hooks/useSurfaceHeader.d.ts.map +1 -1
- package/lib/typescript/module/ui/oauth/browserAuthTransport.d.ts.map +1 -1
- package/lib/typescript/module/ui/oauth/legacyRedirectLanes.d.ts +40 -0
- package/lib/typescript/module/ui/oauth/legacyRedirectLanes.d.ts.map +1 -0
- package/lib/typescript/module/ui/oauth/oauthPopup.d.ts +0 -6
- package/lib/typescript/module/ui/oauth/oauthPopup.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/ChangeAvatarScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/EditProfileScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/FeedbackScreen.d.ts +2 -2
- package/lib/typescript/module/ui/screens/FeedbackScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/FollowersListScreen.d.ts +0 -3
- package/lib/typescript/module/ui/screens/FollowersListScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/FollowingListScreen.d.ts +0 -3
- package/lib/typescript/module/ui/screens/FollowingListScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/HistoryViewScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/ManageAccountScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/ProfileScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/UserListScreen.d.ts +0 -7
- package/lib/typescript/module/ui/screens/UserListScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/WelcomeNewUserScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/fileManagement/hooks/useFileUploadState.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/trust/TrustLeaderboardScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/trust/trustTier.d.ts +1 -1
- package/lib/typescript/module/ui/screens/trust/trustTier.d.ts.map +1 -1
- package/lib/typescript/module/ui/session/index.d.ts +0 -1
- package/lib/typescript/module/ui/session/index.d.ts.map +1 -1
- package/lib/typescript/module/ui/types/navigation.d.ts +19 -27
- package/lib/typescript/module/ui/types/navigation.d.ts.map +1 -1
- package/lib/typescript/module/ui/utils/crossOriginRestore.d.ts +43 -0
- package/lib/typescript/module/ui/utils/crossOriginRestore.d.ts.map +1 -0
- package/lib/typescript/module/ui/utils/fileManagement.d.ts +5 -5
- package/lib/typescript/module/ui/utils/fileManagement.d.ts.map +1 -1
- package/lib/typescript/module/ui/utils/oauthReturn.d.ts +12 -15
- package/lib/typescript/module/ui/utils/oauthReturn.d.ts.map +1 -1
- package/lib/typescript/module/ui/utils/userUtils.d.ts +14 -7
- package/lib/typescript/module/ui/utils/userUtils.d.ts.map +1 -1
- package/package.json +10 -22
- package/src/index.ts +16 -18
- package/src/notifications/deviceNotifications.ts +0 -82
- package/src/ui/boot/__tests__/coldBootWebAuthMode.test.ts +281 -0
- package/src/ui/boot/runProviderColdBoot.ts +101 -24
- package/src/ui/components/FollowButton.tsx +1 -1
- package/src/ui/components/OxyAccountDialogScreen.tsx +1 -13
- package/src/ui/components/OxyAuthChooser.tsx +4 -14
- package/src/ui/components/OxyProvider.tsx +7 -8
- package/src/ui/components/ProfileButton.tsx +2 -5
- package/src/ui/components/authChooser/AccountsMenuView.tsx +10 -5
- package/src/ui/components/authChooser/primitives.tsx +1 -1
- package/src/ui/components/authChooser/useUsernameAvailability.ts +1 -1
- package/src/ui/components/fileManagement/UploadPreview.tsx +1 -1
- package/src/ui/components/internal/PinInput.tsx +0 -1
- package/src/ui/components/logo/LogoText.tsx +4 -4
- package/src/ui/components/payment/PaymentDetailsStep.tsx +1 -1
- package/src/ui/components/payment/PaymentSummaryStep.tsx +2 -2
- package/src/ui/components/payment/types.ts +24 -24
- package/src/ui/components/styles/shadow.tsx +2 -2
- package/src/ui/context/OxyContext.tsx +46 -35
- package/src/ui/context/__tests__/commitSessionFlow.test.ts +89 -13
- package/src/ui/context/commitSessionFlow.ts +61 -3
- package/src/ui/context/hooks/useAuthOperations.ts +1 -26
- package/src/ui/context/oxyContextTypes.ts +7 -26
- package/src/ui/context/useOxyAccountGraph.ts +4 -4
- package/src/ui/hooks/mutations/mutationFactory.ts +1 -1
- package/src/ui/hooks/mutations/useAccountMutations.ts +1 -1
- package/src/ui/hooks/mutations/useServicesMutations.ts +1 -1
- package/src/ui/hooks/queries/paymentTypes.ts +2 -3
- package/src/ui/hooks/queries/usePaymentQueries.ts +2 -3
- package/src/ui/hooks/queries/userCache.ts +148 -169
- package/src/ui/hooks/useAssets.ts +1 -1
- package/src/ui/hooks/useAsyncAction.ts +3 -3
- package/src/ui/hooks/useAuth.ts +2 -4
- package/src/ui/hooks/useAvatarPicker.ts +1 -1
- package/src/ui/hooks/useOnlineStatus.ts +2 -3
- package/src/ui/hooks/useSessionManagement.ts +2 -0
- package/src/ui/hooks/useSettingToggle.ts +1 -1
- package/src/ui/hooks/useSurfaceHeader.ts +15 -90
- package/src/ui/oauth/__tests__/oauthPopup.test.ts +0 -26
- package/src/ui/oauth/browserAuthTransport.ts +49 -55
- package/src/ui/oauth/legacyRedirectLanes.ts +43 -0
- package/src/ui/oauth/oauthPopup.ts +3 -61
- package/src/ui/screens/AccountMembersScreen.tsx +1 -1
- package/src/ui/screens/AccountSettingsScreen.tsx +5 -5
- package/src/ui/screens/AccountVerificationScreen.tsx +1 -1
- package/src/ui/screens/AppInfoScreen.tsx +1 -1
- package/src/ui/screens/AvatarCropScreen.tsx +1 -1
- package/src/ui/screens/ChangeAvatarScreen.tsx +4 -7
- package/src/ui/screens/ConnectedAppsScreen.tsx +2 -2
- package/src/ui/screens/CreateAccountScreen.tsx +1 -1
- package/src/ui/screens/EditProfileFieldScreen.tsx +1 -1
- package/src/ui/screens/EditProfileScreen.tsx +3 -6
- package/src/ui/screens/FAQScreen.tsx +1 -1
- package/src/ui/screens/FeedbackScreen.tsx +575 -741
- package/src/ui/screens/FileManagementScreen.tsx +1 -1
- package/src/ui/screens/FollowersListScreen.tsx +0 -3
- package/src/ui/screens/FollowingListScreen.tsx +0 -3
- package/src/ui/screens/HelpSupportScreen.tsx +1 -1
- package/src/ui/screens/HistoryViewScreen.tsx +20 -5
- package/src/ui/screens/LanguageSelectorScreen.tsx +1 -1
- package/src/ui/screens/LegalDocumentsScreen.tsx +1 -1
- package/src/ui/screens/ManageAccountScreen.tsx +2 -9
- package/src/ui/screens/PremiumSubscriptionScreen.tsx +4 -4
- package/src/ui/screens/PrivacySettingsScreen.tsx +12 -15
- package/src/ui/screens/ProfileScreen.tsx +6 -24
- package/src/ui/screens/SavesCollectionsScreen.tsx +1 -1
- package/src/ui/screens/UserListScreen.tsx +8 -18
- package/src/ui/screens/WelcomeNewUserScreen.tsx +6 -6
- package/src/ui/screens/fileManagement/PhotoPickerSection.tsx +1 -1
- package/src/ui/screens/fileManagement/hooks/useFileUploadState.ts +5 -14
- package/src/ui/screens/trust/TrustCenterScreen.tsx +2 -2
- package/src/ui/screens/trust/TrustLeaderboardScreen.tsx +5 -6
- package/src/ui/screens/trust/TrustRewardsScreen.tsx +1 -1
- package/src/ui/screens/trust/TrustRulesScreen.tsx +1 -1
- package/src/ui/screens/trust/trustTier.ts +1 -1
- package/src/ui/session/index.ts +0 -1
- package/src/ui/types/navigation.ts +19 -27
- package/src/ui/utils/__tests__/crossOriginRestore.test.ts +143 -0
- package/src/ui/utils/crossOriginRestore.ts +169 -0
- package/src/ui/utils/fileManagement.ts +92 -108
- package/src/ui/utils/oauthReturn.ts +33 -23
- package/src/ui/utils/userUtils.ts +32 -27
- package/android/src/main/java/so/oxy/session/OxyBackgroundSession.kt +0 -184
- package/android/src/main/java/so/oxy/session/OxyBackgroundSessionApi.kt +0 -162
- package/android/src/main/java/so/oxy/session/OxyBackgroundSessionModule.kt +0 -116
- package/android/src/main/java/so/oxy/session/OxyBackgroundSessionStore.kt +0 -179
- package/android/src/main/java/so/oxy/session/OxyBackgroundToken.kt +0 -61
- package/android/src/main/java/so/oxy/storage/OxyEncryptedPrefs.kt +0 -241
- package/lib/commonjs/ui/session/backgroundSession.js +0 -258
- package/lib/commonjs/ui/session/backgroundSession.js.map +0 -1
- package/lib/commonjs/ui/session/useBackgroundSessionSync.js +0 -81
- package/lib/commonjs/ui/session/useBackgroundSessionSync.js.map +0 -1
- package/lib/commonjs/ui/utils/netConnectivity.js +0 -28
- package/lib/commonjs/ui/utils/netConnectivity.js.map +0 -1
- package/lib/module/ui/session/backgroundSession.js +0 -252
- package/lib/module/ui/session/backgroundSession.js.map +0 -1
- package/lib/module/ui/session/useBackgroundSessionSync.js +0 -76
- package/lib/module/ui/session/useBackgroundSessionSync.js.map +0 -1
- package/lib/module/ui/utils/netConnectivity.js +0 -23
- package/lib/module/ui/utils/netConnectivity.js.map +0 -1
- package/lib/typescript/commonjs/ui/session/backgroundSession.d.ts +0 -42
- package/lib/typescript/commonjs/ui/session/backgroundSession.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/session/useBackgroundSessionSync.d.ts +0 -23
- package/lib/typescript/commonjs/ui/session/useBackgroundSessionSync.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/utils/netConnectivity.d.ts +0 -17
- package/lib/typescript/commonjs/ui/utils/netConnectivity.d.ts.map +0 -1
- package/lib/typescript/module/ui/session/backgroundSession.d.ts +0 -42
- package/lib/typescript/module/ui/session/backgroundSession.d.ts.map +0 -1
- package/lib/typescript/module/ui/session/useBackgroundSessionSync.d.ts +0 -23
- package/lib/typescript/module/ui/session/useBackgroundSessionSync.d.ts.map +0 -1
- package/lib/typescript/module/ui/utils/netConnectivity.d.ts +0 -17
- package/lib/typescript/module/ui/utils/netConnectivity.d.ts.map +0 -1
- package/src/ui/boot/__tests__/coldBootNoIdpRedirect.test.ts +0 -215
- package/src/ui/session/__tests__/backgroundSession.test.ts +0 -392
- package/src/ui/session/backgroundSession.ts +0 -313
- package/src/ui/session/useBackgroundSessionSync.ts +0 -92
- package/src/ui/utils/netConnectivity.ts +0 -27
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
|
|
26
26
|
import type React from 'react';
|
|
27
27
|
import { Fragment, useCallback, useState } from 'react';
|
|
28
|
-
import { Pressable, View } from 'react-native';
|
|
28
|
+
import { Pressable, View } from 'react-native-css/components';
|
|
29
29
|
import Animated, {
|
|
30
30
|
Extrapolation,
|
|
31
31
|
interpolate,
|
|
@@ -99,6 +99,11 @@ const FACEPILE_AVATAR_SIZE = 32;
|
|
|
99
99
|
*/
|
|
100
100
|
const FACEPILE_OVERLAP = 4;
|
|
101
101
|
|
|
102
|
+
// Vite/RN-Web does not install NativeWind's Metro global className polyfill.
|
|
103
|
+
// Use react-native-css components explicitly so this className markup also
|
|
104
|
+
// works in Vite web hosts.
|
|
105
|
+
const AnimatedCssView = Animated.createAnimatedComponent(View);
|
|
106
|
+
|
|
102
107
|
/**
|
|
103
108
|
* The hero's address line, shown under the "Hi, <name>!" greeting: the account's
|
|
104
109
|
* canonical `@oxy.so` email when it has one, else its normalized `@handle`. Never
|
|
@@ -381,7 +386,7 @@ const AccountsMenuView: React.FC<AccountsMenuViewProps> = ({
|
|
|
381
386
|
{/* SWITCH ACCOUNT — own NativeWind card, NOT a Bloom grouped section: it
|
|
382
387
|
is a disclosure header over an animated list, not a list of settings
|
|
383
388
|
rows, and the grouped section is not a bare card container. */}
|
|
384
|
-
<
|
|
389
|
+
<AnimatedCssView className="bg-fill overflow-hidden mb-space-16" style={switchCardStyle}>
|
|
385
390
|
<HoverPressable
|
|
386
391
|
baseClassName={`flex-row items-center gap-space-12 px-space-12 py-[10px] min-h-[44px]${
|
|
387
392
|
switchingDisabled ? ' opacity-60' : ''
|
|
@@ -424,7 +429,7 @@ const AccountsMenuView: React.FC<AccountsMenuViewProps> = ({
|
|
|
424
429
|
{/* Animated reveal: an overflow-clipped container whose height + opacity
|
|
425
430
|
are driven by `listProgress`; the inner style-based wrapper measures
|
|
426
431
|
the natural content height via `onLayout`. */}
|
|
427
|
-
<
|
|
432
|
+
<AnimatedCssView
|
|
428
433
|
style={[styles.collapse, listStyle]}
|
|
429
434
|
pointerEvents={expanded ? 'auto' : 'none'}
|
|
430
435
|
>
|
|
@@ -434,8 +439,8 @@ const AccountsMenuView: React.FC<AccountsMenuViewProps> = ({
|
|
|
434
439
|
>
|
|
435
440
|
<View>{listItems}</View>
|
|
436
441
|
</View>
|
|
437
|
-
</
|
|
438
|
-
</
|
|
442
|
+
</AnimatedCssView>
|
|
443
|
+
</AnimatedCssView>
|
|
439
444
|
|
|
440
445
|
{/* OXY STORAGE — own NativeWind card for the same reason: a title, a meter
|
|
441
446
|
and two chips are not settings rows. Its cloud sits in the same 20px
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
import type React from 'react';
|
|
8
8
|
import { useState } from 'react';
|
|
9
|
-
import { Pressable, View } from 'react-native';
|
|
9
|
+
import { Pressable, View } from 'react-native-css/components';
|
|
10
10
|
import MaterialCommunityIcons from '@expo/vector-icons/MaterialCommunityIcons';
|
|
11
11
|
import { Avatar } from '@oxyhq/bloom/avatar';
|
|
12
12
|
import { Text } from '@oxyhq/bloom/typography';
|
|
@@ -2,7 +2,7 @@ import type React from 'react';
|
|
|
2
2
|
import { View, Text, TouchableOpacity, ScrollView, StyleSheet } from 'react-native';
|
|
3
3
|
import { Image as ExpoImage } from 'expo-image';
|
|
4
4
|
import Ionicons from '@expo/vector-icons/Ionicons';
|
|
5
|
-
import { Dialog, type DialogControlProps } from '@oxyhq/bloom
|
|
5
|
+
import { Dialog, type DialogControlProps } from '@oxyhq/bloom';
|
|
6
6
|
import { useTheme } from '@oxyhq/bloom/theme';
|
|
7
7
|
import { formatFileSize, getFileIcon } from '../../utils/fileManagement';
|
|
8
8
|
import type { PendingUploadFile } from '../../screens/fileManagement/shared';
|
|
@@ -64,7 +64,6 @@ const PinInput = forwardRef<PinInputHandle, PinInputProps>(({ value, onChange, l
|
|
|
64
64
|
<View style={styles.pinContainer}>
|
|
65
65
|
{Array.from({ length }).map((_, idx) => (
|
|
66
66
|
<TextInput
|
|
67
|
-
// biome-ignore lint/suspicious/noArrayIndexKey: fixed-position PIN cells, order never changes
|
|
68
67
|
key={`pin-input-${idx}`}
|
|
69
68
|
ref={(ref) => { inputs.current[idx] = ref; }}
|
|
70
69
|
style={[
|
|
@@ -55,13 +55,13 @@ export const LogoText: React.FC<LogoTextProps> = ({
|
|
|
55
55
|
return (
|
|
56
56
|
<Svg viewBox={`0 0 ${VIEW_BOX_WIDTH} ${VIEW_BOX_HEIGHT}`} width={width} height={height} style={style}>
|
|
57
57
|
<G>
|
|
58
|
-
{OUTER_PATHS.map((d) => (
|
|
59
|
-
<Path key={
|
|
58
|
+
{OUTER_PATHS.map((d, i) => (
|
|
59
|
+
<Path key={`outer-${i}`} d={d} fill={resolvedColor} />
|
|
60
60
|
))}
|
|
61
61
|
</G>
|
|
62
62
|
<G transform="translate(10.316 2.495)">
|
|
63
|
-
{INNER_LETTER_PATHS.map((d) => (
|
|
64
|
-
<Path key={
|
|
63
|
+
{INNER_LETTER_PATHS.map((d, i) => (
|
|
64
|
+
<Path key={`inner-${i}`} d={d} fill={resolvedLetterColor} />
|
|
65
65
|
))}
|
|
66
66
|
</G>
|
|
67
67
|
</Svg>
|
|
@@ -6,7 +6,7 @@ import { Button } from '@oxyhq/bloom/button';
|
|
|
6
6
|
import { TextField, TextFieldInput } from '@oxyhq/bloom/text-field';
|
|
7
7
|
import FAIRWalletIcon from '../icon/FAIRWalletIcon';
|
|
8
8
|
import { createPaymentStyles } from './paymentStyles';
|
|
9
|
-
import { toast } from '@oxyhq/bloom
|
|
9
|
+
import { toast } from '@oxyhq/bloom';
|
|
10
10
|
import type { CardDetails, PaymentColors, PaymentStepAnimations } from './types';
|
|
11
11
|
import { useI18n } from '../../hooks/useI18n';
|
|
12
12
|
|
|
@@ -85,9 +85,9 @@ const PaymentSummaryStep: React.FC<PaymentSummaryStepProps> = ({
|
|
|
85
85
|
<>
|
|
86
86
|
<View style={styles.summaryCardItems}>
|
|
87
87
|
<SettingsListGroup>
|
|
88
|
-
{paymentItems.map((item) => (
|
|
88
|
+
{paymentItems.map((item, idx) => (
|
|
89
89
|
<SettingsListItem
|
|
90
|
-
key={
|
|
90
|
+
key={`item-${idx}`}
|
|
91
91
|
icon={<Ionicons name={getItemTypeIcon(item.type)} size={20} color={colors.primary} />}
|
|
92
92
|
title={`${item.type === 'product' && item.quantity ? `${item.quantity} \u00d7 ` : ''}${item.name}${item.type === 'subscription' && item.period ? ` (${item.period})` : ''}`}
|
|
93
93
|
description={item.description || `${item.currency ? (CURRENCY_SYMBOLS[item.currency.toUpperCase()] || item.currency) : currencySymbol} ${item.price * (item.quantity ?? 1)}`}
|
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import type {
|
|
3
|
-
import type
|
|
4
|
-
import type {
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { Animated } from 'react-native';
|
|
3
|
+
import type Ionicons from '@expo/vector-icons/Ionicons';
|
|
4
|
+
import type { ThemeColors } from '@oxyhq/bloom/theme';
|
|
5
5
|
|
|
6
6
|
export type PaymentItem = {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
7
|
+
type: 'product' | 'subscription' | 'service' | 'fee' | string;
|
|
8
|
+
name: string;
|
|
9
|
+
description?: string;
|
|
10
|
+
quantity?: number;
|
|
11
|
+
period?: string;
|
|
12
|
+
price: number;
|
|
13
|
+
currency?: string;
|
|
14
14
|
};
|
|
15
15
|
|
|
16
16
|
export interface PaymentGatewayResult {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
success: boolean;
|
|
18
|
+
details?: Record<string, string | number | boolean | null>;
|
|
19
|
+
error?: string;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
export interface CardDetails {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
number: string;
|
|
24
|
+
expiry: string;
|
|
25
|
+
cvv: string;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
export interface PaymentMethod {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
key: string;
|
|
30
|
+
label: string;
|
|
31
|
+
icon: React.ComponentProps<typeof Ionicons>['name'];
|
|
32
|
+
description: string;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
export interface PaymentStepAnimations {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
fadeAnim: Animated.Value;
|
|
37
|
+
slideAnim: Animated.Value;
|
|
38
|
+
scaleAnim: Animated.Value;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
/**
|
|
@@ -26,6 +26,7 @@ import {
|
|
|
26
26
|
startTokenRefreshScheduler,
|
|
27
27
|
createAccountDialogController,
|
|
28
28
|
logger as loggerUtil,
|
|
29
|
+
syncHubAfterSignIn,
|
|
29
30
|
} from '@oxyhq/core';
|
|
30
31
|
import {
|
|
31
32
|
registerAccountDialogControls,
|
|
@@ -70,7 +71,6 @@ import {
|
|
|
70
71
|
activeUserOf,
|
|
71
72
|
accountIdsOf,
|
|
72
73
|
IdentityBoundSessionError,
|
|
73
|
-
useBackgroundSessionSync,
|
|
74
74
|
type IdentitySessionBinding,
|
|
75
75
|
} from '../session';
|
|
76
76
|
import type {
|
|
@@ -79,7 +79,7 @@ import type {
|
|
|
79
79
|
CommitInput,
|
|
80
80
|
} from './oxyContextTypes';
|
|
81
81
|
import { DEFAULT_SESSION_VALIDITY_MS, loadUseFollowHook } from './oxyContextHelpers';
|
|
82
|
-
import { commitDeviceSetAndResolve } from './commitSessionFlow';
|
|
82
|
+
import { commitDeviceSetAndResolve, maybeSyncHubAfterCommit } from './commitSessionFlow';
|
|
83
83
|
import { runPasskeyLogin, runPasskeyRegister, runPasskeyAdd } from './passkeyFlow';
|
|
84
84
|
import {
|
|
85
85
|
isPasskeySupported,
|
|
@@ -103,8 +103,8 @@ export const OxyProvider: React.FC<OxyContextProviderProps> = ({
|
|
|
103
103
|
storageKeyPrefix = 'oxy_session',
|
|
104
104
|
clientId: clientIdProp,
|
|
105
105
|
sessionMode = 'account',
|
|
106
|
-
webAuthMode = '
|
|
107
|
-
|
|
106
|
+
webAuthMode = 'redirect',
|
|
107
|
+
hubSync = true,
|
|
108
108
|
onAuthStateChange,
|
|
109
109
|
onError,
|
|
110
110
|
}) => {
|
|
@@ -501,12 +501,6 @@ export const OxyProvider: React.FC<OxyContextProviderProps> = ({
|
|
|
501
501
|
logoutStore,
|
|
502
502
|
setAuthState,
|
|
503
503
|
logger,
|
|
504
|
-
...(identity
|
|
505
|
-
? {
|
|
506
|
-
identityBinding: identity.binding,
|
|
507
|
-
refreshPinnedAccountId: () => identity.refreshPinnedAccountId(),
|
|
508
|
-
}
|
|
509
|
-
: {}),
|
|
510
504
|
});
|
|
511
505
|
|
|
512
506
|
// "That wasn't me": repudiating a flagged sign-in IS revoking the device
|
|
@@ -586,7 +580,7 @@ export const OxyProvider: React.FC<OxyContextProviderProps> = ({
|
|
|
586
580
|
};
|
|
587
581
|
handleTokenChange(oxyServices.getAccessToken());
|
|
588
582
|
return oxyServices.onTokensChanged(handleTokenChange);
|
|
589
|
-
}, [logger, oxyServices
|
|
583
|
+
}, [logger, oxyServices]);
|
|
590
584
|
|
|
591
585
|
// Unified in-session refresh (SDK-owned; every RP inherits it). Installs the
|
|
592
586
|
// ONE core refresh handler (re-mint from the persisted zero-cookie device
|
|
@@ -616,7 +610,10 @@ export const OxyProvider: React.FC<OxyContextProviderProps> = ({
|
|
|
616
610
|
// Used by the QR device flow (`handleWebSession`), password sign-in, 2FA
|
|
617
611
|
// completion, and the cold boot.
|
|
618
612
|
const commitSession = useCallback(
|
|
619
|
-
async (
|
|
613
|
+
async (
|
|
614
|
+
input: CommitInput,
|
|
615
|
+
options: { activate: boolean; hubSync?: boolean },
|
|
616
|
+
): Promise<void> => {
|
|
620
617
|
if (input.accessToken) {
|
|
621
618
|
oxyServices.setTokens(input.accessToken);
|
|
622
619
|
}
|
|
@@ -684,8 +681,21 @@ export const OxyProvider: React.FC<OxyContextProviderProps> = ({
|
|
|
684
681
|
onAuthStateChange: onAuthStateChangeRef.current,
|
|
685
682
|
markAuthResolved: markAuthResolvedRef.current,
|
|
686
683
|
});
|
|
684
|
+
|
|
685
|
+
// Post-sign-in hub sync — a full-page redirect to auth.oxy.so. Gated HERE,
|
|
686
|
+
// inside the ONE commit funnel, so NO commit path (QR device flow,
|
|
687
|
+
// password/2FA through the account dialog, passkey, popup OAuth, cold
|
|
688
|
+
// boot) can bounce a `webAuthMode: 'popup'` tab to the IdP. See
|
|
689
|
+
// `maybeSyncHubAfterCommit` for the full gate list.
|
|
690
|
+
await maybeSyncHubAfterCommit({
|
|
691
|
+
activate: options.activate,
|
|
692
|
+
hubSyncRequested: options.hubSync === true,
|
|
693
|
+
hubSyncEnabled: hubSync,
|
|
694
|
+
webAuthMode,
|
|
695
|
+
syncHub: () => syncHubAfterSignIn(oxyServices, { enabled: hubSync }),
|
|
696
|
+
});
|
|
687
697
|
},
|
|
688
|
-
[oxyServices, authStore, updateSessions, setActiveSessionId, sessionClient, sessionClientHost, syncFromClient, loginSuccess, logger],
|
|
698
|
+
[oxyServices, authStore, updateSessions, setActiveSessionId, sessionClient, sessionClientHost, syncFromClient, loginSuccess, logger, hubSync, webAuthMode],
|
|
689
699
|
);
|
|
690
700
|
const commitSessionRef = useRef(commitSession);
|
|
691
701
|
commitSessionRef.current = commitSession;
|
|
@@ -707,16 +717,16 @@ export const OxyProvider: React.FC<OxyContextProviderProps> = ({
|
|
|
707
717
|
userId: session.user.id,
|
|
708
718
|
user: session.user,
|
|
709
719
|
},
|
|
710
|
-
{ activate: true },
|
|
720
|
+
{ activate: true, hubSync: true },
|
|
711
721
|
);
|
|
712
722
|
},
|
|
713
723
|
[commitSession],
|
|
714
724
|
);
|
|
715
725
|
|
|
716
|
-
// Commit a minted graph-SWITCH session
|
|
717
|
-
// `
|
|
718
|
-
//
|
|
719
|
-
// broadcast.
|
|
726
|
+
// Commit a minted graph-SWITCH session. Same funnel as `handleWebSession` but
|
|
727
|
+
// IN-PLACE: `hubSync: false` so switching accounts never triggers the
|
|
728
|
+
// cross-origin hub-sync full-page redirect. The switch already propagates
|
|
729
|
+
// across tabs/apps via the server's `session_state` socket broadcast.
|
|
720
730
|
const commitSwitchedSession = useCallback(
|
|
721
731
|
async (session: SessionLoginResponse): Promise<void> => {
|
|
722
732
|
if (!session?.user || !session?.sessionId || !session.accessToken) {
|
|
@@ -732,7 +742,7 @@ export const OxyProvider: React.FC<OxyContextProviderProps> = ({
|
|
|
732
742
|
userId: session.user.id,
|
|
733
743
|
user: session.user,
|
|
734
744
|
},
|
|
735
|
-
{ activate: true },
|
|
745
|
+
{ activate: true, hubSync: false },
|
|
736
746
|
);
|
|
737
747
|
},
|
|
738
748
|
[commitSession],
|
|
@@ -743,6 +753,11 @@ export const OxyProvider: React.FC<OxyContextProviderProps> = ({
|
|
|
743
753
|
// to, so no consumer ever writes popup listeners or a token exchange. The
|
|
744
754
|
// transport picks popup vs redirect from `webAuthMode`; both lanes land on the
|
|
745
755
|
// SAME completion path (`completeOAuthCode`) and the same commit funnel here.
|
|
756
|
+
//
|
|
757
|
+
// `hubSync: false` is deliberate: hub sync is a full-page redirect to
|
|
758
|
+
// auth.oxy.so, which would undo the one thing popup mode exists to guarantee —
|
|
759
|
+
// that the relying party never leaves its route. It matches how the redirect
|
|
760
|
+
// lane's return leg commits (see `runProviderColdBoot`).
|
|
746
761
|
const startWebOAuthSignInForContext = useCallback(
|
|
747
762
|
(options: StartWebOAuthSignInOptions): Promise<WebOAuthSignInResult> =>
|
|
748
763
|
startWebOAuthSignIn(
|
|
@@ -752,7 +767,8 @@ export const OxyProvider: React.FC<OxyContextProviderProps> = ({
|
|
|
752
767
|
clientId,
|
|
753
768
|
authorizeBaseUrl,
|
|
754
769
|
identityBound: isIdentityBound,
|
|
755
|
-
commitSession: (input) =>
|
|
770
|
+
commitSession: (input) =>
|
|
771
|
+
commitSessionRef.current(input, { activate: true, hubSync: false }),
|
|
756
772
|
},
|
|
757
773
|
options,
|
|
758
774
|
),
|
|
@@ -951,7 +967,7 @@ export const OxyProvider: React.FC<OxyContextProviderProps> = ({
|
|
|
951
967
|
getLoginOptions: (username) => oxyServices.webauthnLoginOptions(username),
|
|
952
968
|
runCeremony: runAuthenticationCeremony,
|
|
953
969
|
loginVerify: (response, envelope) => oxyServices.webauthnLoginVerify(response, envelope),
|
|
954
|
-
commit: (input) => commitSession(input, { activate: true }),
|
|
970
|
+
commit: (input) => commitSession(input, { activate: true, hubSync: true }),
|
|
955
971
|
username: opts?.username,
|
|
956
972
|
deviceId: persisted?.deviceId,
|
|
957
973
|
deviceName: opts?.deviceName,
|
|
@@ -969,7 +985,7 @@ export const OxyProvider: React.FC<OxyContextProviderProps> = ({
|
|
|
969
985
|
getRegisterOptions: (username) => oxyServices.webauthnRegisterOptions(username),
|
|
970
986
|
runCeremony: runRegistrationCeremony,
|
|
971
987
|
registerVerify: (response, envelope) => oxyServices.webauthnRegisterVerify(response, envelope),
|
|
972
|
-
commit: (input) => commitSession(input, { activate: true }),
|
|
988
|
+
commit: (input) => commitSession(input, { activate: true, hubSync: true }),
|
|
973
989
|
username: params.username,
|
|
974
990
|
deviceName: params.deviceName,
|
|
975
991
|
});
|
|
@@ -1021,8 +1037,13 @@ export const OxyProvider: React.FC<OxyContextProviderProps> = ({
|
|
|
1021
1037
|
authStore,
|
|
1022
1038
|
clientId: clientIdProp,
|
|
1023
1039
|
authRedirectUri,
|
|
1040
|
+
authorizeBaseUrl,
|
|
1024
1041
|
sessionMode,
|
|
1025
1042
|
identity: identity?.binding,
|
|
1043
|
+
// Popup mode forbids the boot's automatic full-page `prompt=none` restore:
|
|
1044
|
+
// a domain with no local credential resolves signed out instead of
|
|
1045
|
+
// navigating the tab to the IdP (see `allowsAutomaticIdpRedirect`).
|
|
1046
|
+
webAuthMode,
|
|
1026
1047
|
sessionClient,
|
|
1027
1048
|
syncDeviceCredentialToHost,
|
|
1028
1049
|
commitSession: (input, options) => commitSessionRef.current(input, options),
|
|
@@ -1040,8 +1061,10 @@ export const OxyProvider: React.FC<OxyContextProviderProps> = ({
|
|
|
1040
1061
|
authStore,
|
|
1041
1062
|
clientIdProp,
|
|
1042
1063
|
authRedirectUri,
|
|
1064
|
+
authorizeBaseUrl,
|
|
1043
1065
|
sessionMode,
|
|
1044
1066
|
identity,
|
|
1067
|
+
webAuthMode,
|
|
1045
1068
|
syncDeviceCredentialToHost,
|
|
1046
1069
|
sessionClient,
|
|
1047
1070
|
]);
|
|
@@ -1197,18 +1220,6 @@ export const OxyProvider: React.FC<OxyContextProviderProps> = ({
|
|
|
1197
1220
|
const canUsePrivateApi = authResolved && isAuthenticated && tokenReady && hasAccessToken;
|
|
1198
1221
|
const isPrivateApiPending = !authResolved || (isAuthenticated && (!tokenReady || !hasAccessToken));
|
|
1199
1222
|
|
|
1200
|
-
// Keep the native background credential in step with this session, so native
|
|
1201
|
-
// background code (a widget worker) can authenticate with no JS runtime. Inert
|
|
1202
|
-
// unless the app opted in. Placed AFTER `canUsePrivateApi` because provisioning
|
|
1203
|
-
// needs a bearer, and keyed on the signed-in account so a sign-out or an
|
|
1204
|
-
// account switch revokes the credential before anything else happens.
|
|
1205
|
-
useBackgroundSessionSync({
|
|
1206
|
-
enabled: backgroundSession,
|
|
1207
|
-
oxyServices,
|
|
1208
|
-
userId: user?.id ?? null,
|
|
1209
|
-
canUsePrivateApi,
|
|
1210
|
-
});
|
|
1211
|
-
|
|
1212
1223
|
const contextValue: OxyContextState = useMemo(
|
|
1213
1224
|
() => ({
|
|
1214
1225
|
user,
|
|
@@ -1355,7 +1366,7 @@ const LOADING_STATE: OxyContextState = {
|
|
|
1355
1366
|
isAuthResolved: false,
|
|
1356
1367
|
isStorageReady: false,
|
|
1357
1368
|
sessionMode: 'account',
|
|
1358
|
-
webAuthMode: '
|
|
1369
|
+
webAuthMode: 'redirect',
|
|
1359
1370
|
error: null,
|
|
1360
1371
|
currentLanguage: 'en-US',
|
|
1361
1372
|
currentLanguages: [],
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import type { User } from '@oxyhq/core';
|
|
2
2
|
import { logger } from '@oxyhq/core';
|
|
3
|
+
import type { WebAuthMode } from '../../oauth/types';
|
|
3
4
|
import {
|
|
4
5
|
commitDeviceSetAndResolve,
|
|
6
|
+
maybeSyncHubAfterCommit,
|
|
5
7
|
type CommitDeviceSetAndResolveDeps,
|
|
8
|
+
type MaybeSyncHubAfterCommitDeps,
|
|
6
9
|
} from '../commitSessionFlow';
|
|
7
10
|
|
|
8
11
|
// A resolved promise chain (addCurrentAccount -> start -> syncFromClient) settles
|
|
@@ -129,19 +132,6 @@ describe('commitDeviceSetAndResolve — cold boot (activate: false)', () => {
|
|
|
129
132
|
expect(deps.markAuthResolved).toHaveBeenCalledTimes(1);
|
|
130
133
|
});
|
|
131
134
|
|
|
132
|
-
it('falls back to the minimal commit-input user when getCurrentUser returns null', async () => {
|
|
133
|
-
const order: string[] = [];
|
|
134
|
-
const deps = buildDeps(order, {
|
|
135
|
-
getCurrentUser: jest.fn(async () => null),
|
|
136
|
-
});
|
|
137
|
-
|
|
138
|
-
await commitDeviceSetAndResolve(deps);
|
|
139
|
-
await flush();
|
|
140
|
-
|
|
141
|
-
expect(deps.loginSuccess).toHaveBeenCalledWith(makeUser('fallback'));
|
|
142
|
-
expect(deps.markAuthResolved).toHaveBeenCalledTimes(1);
|
|
143
|
-
});
|
|
144
|
-
|
|
145
135
|
it('logs (never swallows) a failing background reconcile and still resolves', async () => {
|
|
146
136
|
const warnSpy = jest.spyOn(logger, 'warn').mockImplementation(() => undefined);
|
|
147
137
|
const order: string[] = [];
|
|
@@ -191,6 +181,92 @@ describe('commitDeviceSetAndResolve — cold boot (activate: false)', () => {
|
|
|
191
181
|
});
|
|
192
182
|
});
|
|
193
183
|
|
|
184
|
+
/**
|
|
185
|
+
* Post-sign-in hub sync is a FULL-PAGE redirect to auth.oxy.so. It runs from the
|
|
186
|
+
* ONE commit funnel, so gating it here gates every commit path at once —
|
|
187
|
+
* `webAuthMode: 'popup'` must never bounce the tab, whichever path signed the
|
|
188
|
+
* user in (#691 phase 7).
|
|
189
|
+
*/
|
|
190
|
+
describe('maybeSyncHubAfterCommit — webAuthMode transport gate (#691 phase 7)', () => {
|
|
191
|
+
const buildHubDeps = (
|
|
192
|
+
overrides: Partial<MaybeSyncHubAfterCommitDeps> = {},
|
|
193
|
+
): MaybeSyncHubAfterCommitDeps => ({
|
|
194
|
+
activate: true,
|
|
195
|
+
hubSyncRequested: true,
|
|
196
|
+
hubSyncEnabled: true,
|
|
197
|
+
webAuthMode: 'redirect',
|
|
198
|
+
syncHub: jest.fn(async () => true),
|
|
199
|
+
...overrides,
|
|
200
|
+
});
|
|
201
|
+
|
|
202
|
+
it("redirect mode: syncs the hub after a deliberate sign-in (unchanged)", async () => {
|
|
203
|
+
const deps = buildHubDeps();
|
|
204
|
+
|
|
205
|
+
await expect(maybeSyncHubAfterCommit(deps)).resolves.toBe(true);
|
|
206
|
+
|
|
207
|
+
expect(deps.syncHub).toHaveBeenCalledTimes(1);
|
|
208
|
+
});
|
|
209
|
+
|
|
210
|
+
it('popup mode: NEVER syncs the hub, even on an otherwise-eligible sign-in', async () => {
|
|
211
|
+
const deps = buildHubDeps({ webAuthMode: 'popup' });
|
|
212
|
+
|
|
213
|
+
await expect(maybeSyncHubAfterCommit(deps)).resolves.toBe(false);
|
|
214
|
+
|
|
215
|
+
expect(deps.syncHub).not.toHaveBeenCalled();
|
|
216
|
+
});
|
|
217
|
+
|
|
218
|
+
it('popup mode: no commit path can opt back in', async () => {
|
|
219
|
+
// Every commit path differs only in `activate` / `hubSyncRequested`; the
|
|
220
|
+
// transport gate outranks all of them.
|
|
221
|
+
for (const activate of [true, false]) {
|
|
222
|
+
for (const hubSyncRequested of [true, false]) {
|
|
223
|
+
const deps = buildHubDeps({ webAuthMode: 'popup', activate, hubSyncRequested });
|
|
224
|
+
await expect(maybeSyncHubAfterCommit(deps)).resolves.toBe(false);
|
|
225
|
+
expect(deps.syncHub).not.toHaveBeenCalled();
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
});
|
|
229
|
+
|
|
230
|
+
it.each(['popup', 'redirect'] as const)(
|
|
231
|
+
'never syncs on a cold-boot restore, in either mode (%s)',
|
|
232
|
+
async (webAuthMode: WebAuthMode) => {
|
|
233
|
+
const deps = buildHubDeps({ webAuthMode, activate: false });
|
|
234
|
+
|
|
235
|
+
await expect(maybeSyncHubAfterCommit(deps)).resolves.toBe(false);
|
|
236
|
+
|
|
237
|
+
expect(deps.syncHub).not.toHaveBeenCalled();
|
|
238
|
+
},
|
|
239
|
+
);
|
|
240
|
+
|
|
241
|
+
it('redirect mode: honours the per-commit opt-out (account switch / popup OAuth lanes)', async () => {
|
|
242
|
+
const deps = buildHubDeps({ hubSyncRequested: false });
|
|
243
|
+
|
|
244
|
+
await expect(maybeSyncHubAfterCommit(deps)).resolves.toBe(false);
|
|
245
|
+
|
|
246
|
+
expect(deps.syncHub).not.toHaveBeenCalled();
|
|
247
|
+
});
|
|
248
|
+
|
|
249
|
+
it('redirect mode: honours the provider-level hubSync opt-out', async () => {
|
|
250
|
+
const deps = buildHubDeps({ hubSyncEnabled: false });
|
|
251
|
+
|
|
252
|
+
await expect(maybeSyncHubAfterCommit(deps)).resolves.toBe(false);
|
|
253
|
+
|
|
254
|
+
expect(deps.syncHub).not.toHaveBeenCalled();
|
|
255
|
+
});
|
|
256
|
+
|
|
257
|
+
it('redirect mode: a failing hub sync is non-fatal and never rejects', async () => {
|
|
258
|
+
const deps = buildHubDeps({
|
|
259
|
+
syncHub: jest.fn(async () => {
|
|
260
|
+
throw new Error('hub ticket failed');
|
|
261
|
+
}),
|
|
262
|
+
});
|
|
263
|
+
|
|
264
|
+
await expect(maybeSyncHubAfterCommit(deps)).resolves.toBe(false);
|
|
265
|
+
|
|
266
|
+
expect(deps.syncHub).toHaveBeenCalledTimes(1);
|
|
267
|
+
});
|
|
268
|
+
});
|
|
269
|
+
|
|
194
270
|
describe('commitDeviceSetAndResolve — deliberate sign-in (activate: true)', () => {
|
|
195
271
|
it('BLOCKS on the device-set reconcile before resolving auth (unchanged ordering)', async () => {
|
|
196
272
|
const order: string[] = [];
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import type { User } from '@oxyhq/core';
|
|
2
2
|
import { logger as loggerUtil } from '@oxyhq/core';
|
|
3
|
+
import { allowsAutomaticIdpRedirect } from '../oauth/legacyRedirectLanes';
|
|
4
|
+
import type { WebAuthMode } from '../oauth/types';
|
|
5
|
+
import { isWebBrowser } from '../utils/isWebBrowser';
|
|
3
6
|
import { isUnauthorizedStatus } from './oxyContextHelpers';
|
|
4
7
|
|
|
5
8
|
const LOG_CONTEXT = { component: 'OxyContext', method: 'commitSession' } as const;
|
|
@@ -98,9 +101,6 @@ export async function commitDeviceSetAndResolve(
|
|
|
98
101
|
}
|
|
99
102
|
fullUser = fallbackUser;
|
|
100
103
|
}
|
|
101
|
-
if (!fullUser) {
|
|
102
|
-
fullUser = fallbackUser;
|
|
103
|
-
}
|
|
104
104
|
if (fullUser) {
|
|
105
105
|
loginSuccess(fullUser);
|
|
106
106
|
onAuthStateChange?.(fullUser);
|
|
@@ -126,3 +126,61 @@ export async function commitDeviceSetAndResolve(
|
|
|
126
126
|
await hydrateAndResolve();
|
|
127
127
|
void reconcileDeviceSet().catch(logReconcileError);
|
|
128
128
|
}
|
|
129
|
+
|
|
130
|
+
export interface MaybeSyncHubAfterCommitDeps {
|
|
131
|
+
/** Deliberate sign-in (`true`) vs. a cold-boot / background commit (`false`). */
|
|
132
|
+
activate: boolean;
|
|
133
|
+
/** Per-commit opt-in — `commitSession`'s `options.hubSync`. */
|
|
134
|
+
hubSyncRequested: boolean;
|
|
135
|
+
/** Provider-level opt-out — `OxyProviderProps.hubSync`. */
|
|
136
|
+
hubSyncEnabled: boolean;
|
|
137
|
+
/**
|
|
138
|
+
* The provider's web sign-in transport — `OxyProviderProps.webAuthMode`.
|
|
139
|
+
* A first-class input: `'popup'` forbids the redirect outright.
|
|
140
|
+
*/
|
|
141
|
+
webAuthMode: WebAuthMode;
|
|
142
|
+
/**
|
|
143
|
+
* Starts the full-page hop to `auth.oxy.so/sync`; resolves `true` when the
|
|
144
|
+
* navigation was actually started.
|
|
145
|
+
*/
|
|
146
|
+
syncHub: () => Promise<boolean>;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* Post-sign-in hub sync: plant this device's credential on the IdP hub so OTHER
|
|
151
|
+
* official origins can silently restore a session on their next cold boot.
|
|
152
|
+
*
|
|
153
|
+
* The tail of the ONE commit funnel (`commitSession`), extracted so every gate
|
|
154
|
+
* on this legacy lane lives — and is tested — in one place. Returns whether the
|
|
155
|
+
* full-page redirect was started; a failure is non-fatal and never propagates
|
|
156
|
+
* (the sign-in itself already succeeded).
|
|
157
|
+
*
|
|
158
|
+
* Four gates, all of which must pass:
|
|
159
|
+
* 1. `activate` — only a deliberate sign-in syncs; a cold-boot restore never does.
|
|
160
|
+
* 2. `hubSyncRequested` — the in-place lanes (account switch, popup OAuth) opt out.
|
|
161
|
+
* 3. `hubSyncEnabled` — the provider-level `hubSync` prop.
|
|
162
|
+
* 4. `allowsAutomaticIdpRedirect(webAuthMode)` — hub sync REPLACES the document
|
|
163
|
+
* with `auth.oxy.so`, so `webAuthMode: 'popup'` forbids it: a redirect that
|
|
164
|
+
* bounces the tab defeats the entire point of the mode, no matter which
|
|
165
|
+
* commit path produced the session (issue #691, "Cold boot and cross-domain
|
|
166
|
+
* behavior"). Redirect mode — the default and the compatibility path — is
|
|
167
|
+
* unchanged, and this whole function disappears with it in phase 7b.
|
|
168
|
+
*/
|
|
169
|
+
export async function maybeSyncHubAfterCommit(
|
|
170
|
+
deps: MaybeSyncHubAfterCommitDeps,
|
|
171
|
+
): Promise<boolean> {
|
|
172
|
+
const { activate, hubSyncRequested, hubSyncEnabled, webAuthMode, syncHub } = deps;
|
|
173
|
+
|
|
174
|
+
if (!activate || !hubSyncRequested || !hubSyncEnabled) return false;
|
|
175
|
+
if (!allowsAutomaticIdpRedirect(webAuthMode)) return false;
|
|
176
|
+
if (!isWebBrowser()) return false;
|
|
177
|
+
|
|
178
|
+
try {
|
|
179
|
+
return await syncHub();
|
|
180
|
+
} catch (hubError) {
|
|
181
|
+
if (__DEV__) {
|
|
182
|
+
loggerUtil.debug('Hub sync after sign-in failed (non-fatal)', LOG_CONTEXT, hubError);
|
|
183
|
+
}
|
|
184
|
+
return false;
|
|
185
|
+
}
|
|
186
|
+
}
|