@oxyhq/services 22.13.1 → 23.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/lib/commonjs/ui/boot/runProviderColdBoot.js +20 -64
- package/lib/commonjs/ui/boot/runProviderColdBoot.js.map +1 -1
- package/lib/commonjs/ui/components/AvatarCameraBadge.js +3 -2
- package/lib/commonjs/ui/components/AvatarCameraBadge.js.map +1 -1
- package/lib/commonjs/ui/components/OxyProvider.js +5 -6
- package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
- package/lib/commonjs/ui/components/ProfileButton.js +4 -3
- package/lib/commonjs/ui/components/ProfileButton.js.map +1 -1
- package/lib/commonjs/ui/components/SettingsIcon.js +3 -2
- package/lib/commonjs/ui/components/SettingsIcon.js.map +1 -1
- package/lib/commonjs/ui/components/authChooser/AccountsMenuView.js +7 -7
- package/lib/commonjs/ui/components/authChooser/AccountsMenuView.js.map +1 -1
- package/lib/commonjs/ui/components/authChooser/primitives.js +5 -4
- package/lib/commonjs/ui/components/authChooser/primitives.js.map +1 -1
- package/lib/commonjs/ui/components/authChooser/requestSurfaces.js +2 -2
- package/lib/commonjs/ui/components/authChooser/requestSurfaces.js.map +1 -1
- package/lib/commonjs/ui/components/fileManagement/AnimatedButton.js +3 -2
- package/lib/commonjs/ui/components/fileManagement/AnimatedButton.js.map +1 -1
- package/lib/commonjs/ui/components/fileManagement/FileDetailsModal.js +3 -2
- package/lib/commonjs/ui/components/fileManagement/FileDetailsModal.js.map +1 -1
- package/lib/commonjs/ui/components/fileManagement/FileViewer.js +15 -14
- package/lib/commonjs/ui/components/fileManagement/FileViewer.js.map +1 -1
- package/lib/commonjs/ui/components/fileManagement/UploadPreview.js +6 -5
- package/lib/commonjs/ui/components/fileManagement/UploadPreview.js.map +1 -1
- package/lib/commonjs/ui/components/modals/DeleteAccountModal.js +3 -2
- package/lib/commonjs/ui/components/modals/DeleteAccountModal.js.map +1 -1
- package/lib/commonjs/ui/components/payment/PaymentDetailsStep.js +6 -6
- package/lib/commonjs/ui/components/payment/PaymentDetailsStep.js.map +1 -1
- package/lib/commonjs/ui/components/payment/PaymentMethodStep.js +5 -5
- package/lib/commonjs/ui/components/payment/PaymentMethodStep.js.map +1 -1
- package/lib/commonjs/ui/components/payment/PaymentReviewStep.js +10 -9
- package/lib/commonjs/ui/components/payment/PaymentReviewStep.js.map +1 -1
- package/lib/commonjs/ui/components/payment/PaymentSuccessStep.js +4 -3
- package/lib/commonjs/ui/components/payment/PaymentSuccessStep.js.map +1 -1
- package/lib/commonjs/ui/components/payment/PaymentSummaryStep.js +6 -5
- 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 +14 -45
- package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
- package/lib/commonjs/ui/context/commitSessionFlow.js +0 -43
- package/lib/commonjs/ui/context/commitSessionFlow.js.map +1 -1
- package/lib/commonjs/ui/context/useOxyAccountGraph.js +3 -4
- package/lib/commonjs/ui/context/useOxyAccountGraph.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/useAuth.js +4 -2
- package/lib/commonjs/ui/hooks/useAuth.js.map +1 -1
- package/lib/commonjs/ui/hooks/useOnlineStatus.js +3 -2
- package/lib/commonjs/ui/hooks/useOnlineStatus.js.map +1 -1
- package/lib/commonjs/ui/hooks/useSessionManagement.js +0 -2
- package/lib/commonjs/ui/hooks/useSessionManagement.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountMembersScreen.js +4 -3
- package/lib/commonjs/ui/screens/AccountMembersScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ConnectedAppsScreen.js +1 -1
- package/lib/commonjs/ui/screens/ConnectedAppsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/CreateAccountScreen.js +7 -6
- package/lib/commonjs/ui/screens/CreateAccountScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/EditProfileFieldScreen.js +4 -3
- package/lib/commonjs/ui/screens/EditProfileFieldScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FAQScreen.js +3 -2
- package/lib/commonjs/ui/screens/FAQScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FeedbackScreen.js +96 -96
- package/lib/commonjs/ui/screens/FeedbackScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FileManagementScreen.js +19 -18
- package/lib/commonjs/ui/screens/FileManagementScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/HistoryViewScreen.js +4 -29
- package/lib/commonjs/ui/screens/HistoryViewScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/LanguageSelectorScreen.js +4 -3
- package/lib/commonjs/ui/screens/LanguageSelectorScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ManageAccountScreen.js +2 -2
- package/lib/commonjs/ui/screens/ManageAccountScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PaymentGatewayScreen.js +3 -3
- package/lib/commonjs/ui/screens/PaymentGatewayScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js +10 -9
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PrivacySettingsScreen.js +1 -0
- package/lib/commonjs/ui/screens/PrivacySettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ProfileScreen.js +12 -13
- package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/UserListScreen.js +4 -4
- package/lib/commonjs/ui/screens/UserListScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js +6 -6
- package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/fileManagement/FileLibraryError.js +4 -3
- package/lib/commonjs/ui/screens/fileManagement/FileLibraryError.js.map +1 -1
- package/lib/commonjs/ui/screens/fileManagement/FileListSection.js +4 -3
- package/lib/commonjs/ui/screens/fileManagement/FileListSection.js.map +1 -1
- package/lib/commonjs/ui/screens/fileManagement/PhotoPickerSection.js +5 -7
- package/lib/commonjs/ui/screens/fileManagement/PhotoPickerSection.js.map +1 -1
- package/lib/commonjs/ui/screens/fileManagement/UploadBar.js +3 -2
- package/lib/commonjs/ui/screens/fileManagement/UploadBar.js.map +1 -1
- package/lib/commonjs/ui/screens/trust/TrustCenterScreen.js +3 -2
- package/lib/commonjs/ui/screens/trust/TrustCenterScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/trust/TrustLeaderboardScreen.js +5 -4
- package/lib/commonjs/ui/screens/trust/TrustLeaderboardScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/trust/TrustRewardsScreen.js +4 -3
- package/lib/commonjs/ui/screens/trust/TrustRewardsScreen.js.map +1 -1
- package/lib/commonjs/ui/utils/fileManagement.js +24 -24
- package/lib/commonjs/ui/utils/fileManagement.js.map +1 -1
- package/lib/commonjs/ui/utils/netConnectivity.js +28 -0
- package/lib/commonjs/ui/utils/netConnectivity.js.map +1 -0
- package/lib/commonjs/ui/utils/oauthReturn.js +15 -28
- package/lib/commonjs/ui/utils/oauthReturn.js.map +1 -1
- package/lib/module/ui/boot/runProviderColdBoot.js +21 -65
- package/lib/module/ui/boot/runProviderColdBoot.js.map +1 -1
- package/lib/module/ui/components/AvatarCameraBadge.js +1 -1
- package/lib/module/ui/components/AvatarCameraBadge.js.map +1 -1
- package/lib/module/ui/components/OxyProvider.js +5 -6
- package/lib/module/ui/components/OxyProvider.js.map +1 -1
- package/lib/module/ui/components/ProfileButton.js +1 -1
- package/lib/module/ui/components/ProfileButton.js.map +1 -1
- package/lib/module/ui/components/SettingsIcon.js +1 -1
- package/lib/module/ui/components/SettingsIcon.js.map +1 -1
- package/lib/module/ui/components/authChooser/AccountsMenuView.js +1 -1
- 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/requestSurfaces.js +1 -1
- package/lib/module/ui/components/authChooser/requestSurfaces.js.map +1 -1
- package/lib/module/ui/components/fileManagement/AnimatedButton.js +1 -1
- package/lib/module/ui/components/fileManagement/AnimatedButton.js.map +1 -1
- package/lib/module/ui/components/fileManagement/FileDetailsModal.js +1 -1
- package/lib/module/ui/components/fileManagement/FileDetailsModal.js.map +1 -1
- package/lib/module/ui/components/fileManagement/FileViewer.js +1 -1
- package/lib/module/ui/components/fileManagement/FileViewer.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/modals/DeleteAccountModal.js +1 -1
- package/lib/module/ui/components/modals/DeleteAccountModal.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/PaymentMethodStep.js +1 -1
- package/lib/module/ui/components/payment/PaymentMethodStep.js.map +1 -1
- package/lib/module/ui/components/payment/PaymentReviewStep.js +1 -1
- package/lib/module/ui/components/payment/PaymentReviewStep.js.map +1 -1
- package/lib/module/ui/components/payment/PaymentSuccessStep.js +1 -1
- package/lib/module/ui/components/payment/PaymentSuccessStep.js.map +1 -1
- package/lib/module/ui/components/payment/PaymentSummaryStep.js +1 -1
- 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 +16 -47
- package/lib/module/ui/context/OxyContext.js.map +1 -1
- package/lib/module/ui/context/commitSessionFlow.js +0 -42
- package/lib/module/ui/context/commitSessionFlow.js.map +1 -1
- package/lib/module/ui/context/useOxyAccountGraph.js +3 -4
- package/lib/module/ui/context/useOxyAccountGraph.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/useAuth.js +4 -2
- package/lib/module/ui/hooks/useAuth.js.map +1 -1
- package/lib/module/ui/hooks/useOnlineStatus.js +3 -2
- package/lib/module/ui/hooks/useOnlineStatus.js.map +1 -1
- package/lib/module/ui/hooks/useSessionManagement.js +0 -2
- package/lib/module/ui/hooks/useSessionManagement.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/ConnectedAppsScreen.js +1 -1
- 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/FAQScreen.js +1 -1
- package/lib/module/ui/screens/FAQScreen.js.map +1 -1
- package/lib/module/ui/screens/FeedbackScreen.js +91 -90
- package/lib/module/ui/screens/FeedbackScreen.js.map +1 -1
- package/lib/module/ui/screens/FileManagementScreen.js +2 -1
- package/lib/module/ui/screens/FileManagementScreen.js.map +1 -1
- package/lib/module/ui/screens/HistoryViewScreen.js +4 -29
- 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/ManageAccountScreen.js +1 -1
- package/lib/module/ui/screens/ManageAccountScreen.js.map +1 -1
- package/lib/module/ui/screens/PaymentGatewayScreen.js +1 -1
- package/lib/module/ui/screens/PaymentGatewayScreen.js.map +1 -1
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js +2 -2
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
- package/lib/module/ui/screens/PrivacySettingsScreen.js +1 -0
- package/lib/module/ui/screens/PrivacySettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/ProfileScreen.js +4 -5
- package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/module/ui/screens/UserListScreen.js +3 -3
- package/lib/module/ui/screens/UserListScreen.js.map +1 -1
- package/lib/module/ui/screens/WelcomeNewUserScreen.js +5 -6
- package/lib/module/ui/screens/WelcomeNewUserScreen.js.map +1 -1
- package/lib/module/ui/screens/fileManagement/FileLibraryError.js +1 -1
- package/lib/module/ui/screens/fileManagement/FileLibraryError.js.map +1 -1
- package/lib/module/ui/screens/fileManagement/FileListSection.js +1 -1
- package/lib/module/ui/screens/fileManagement/FileListSection.js.map +1 -1
- package/lib/module/ui/screens/fileManagement/PhotoPickerSection.js +3 -5
- package/lib/module/ui/screens/fileManagement/PhotoPickerSection.js.map +1 -1
- package/lib/module/ui/screens/fileManagement/UploadBar.js +1 -1
- package/lib/module/ui/screens/fileManagement/UploadBar.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 +3 -3
- 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/utils/fileManagement.js +25 -25
- package/lib/module/ui/utils/fileManagement.js.map +1 -1
- package/lib/module/ui/utils/netConnectivity.js +23 -0
- package/lib/module/ui/utils/netConnectivity.js.map +1 -0
- package/lib/module/ui/utils/oauthReturn.js +15 -27
- package/lib/module/ui/utils/oauthReturn.js.map +1 -1
- package/lib/typescript/commonjs/ui/boot/runProviderColdBoot.d.ts +11 -30
- package/lib/typescript/commonjs/ui/boot/runProviderColdBoot.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/SettingsIcon.d.ts +1 -1
- package/lib/typescript/commonjs/ui/components/SettingsIcon.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/authChooser/requestSurfaces.d.ts +1 -1
- package/lib/typescript/commonjs/ui/components/authChooser/requestSurfaces.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 +0 -40
- package/lib/typescript/commonjs/ui/context/commitSessionFlow.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/oxyContextTypes.d.ts +4 -7
- package/lib/typescript/commonjs/ui/context/oxyContextTypes.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/useOxyAccountGraph.d.ts +0 -1
- package/lib/typescript/commonjs/ui/context/useOxyAccountGraph.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 +4 -2
- package/lib/typescript/commonjs/ui/hooks/useAuth.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useOnlineStatus.d.ts +3 -2
- 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/screens/FeedbackScreen.d.ts +2 -2
- package/lib/typescript/commonjs/ui/screens/FeedbackScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/FileManagementScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/HistoryViewScreen.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/WelcomeNewUserScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/fileManagement/PhotoPickerSection.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/trust/TrustLeaderboardScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/types/navigation.d.ts +20 -19
- package/lib/typescript/commonjs/ui/types/navigation.d.ts.map +1 -1
- 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/netConnectivity.d.ts +17 -0
- package/lib/typescript/commonjs/ui/utils/netConnectivity.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/utils/oauthReturn.d.ts +15 -12
- package/lib/typescript/commonjs/ui/utils/oauthReturn.d.ts.map +1 -1
- package/lib/typescript/module/ui/boot/runProviderColdBoot.d.ts +11 -30
- package/lib/typescript/module/ui/boot/runProviderColdBoot.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/SettingsIcon.d.ts +1 -1
- package/lib/typescript/module/ui/components/SettingsIcon.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/authChooser/requestSurfaces.d.ts +1 -1
- package/lib/typescript/module/ui/components/authChooser/requestSurfaces.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 +0 -40
- package/lib/typescript/module/ui/context/commitSessionFlow.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/oxyContextTypes.d.ts +4 -7
- package/lib/typescript/module/ui/context/oxyContextTypes.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/useOxyAccountGraph.d.ts +0 -1
- package/lib/typescript/module/ui/context/useOxyAccountGraph.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 +4 -2
- package/lib/typescript/module/ui/hooks/useAuth.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useOnlineStatus.d.ts +3 -2
- 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/screens/FeedbackScreen.d.ts +2 -2
- package/lib/typescript/module/ui/screens/FeedbackScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/FileManagementScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/HistoryViewScreen.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/WelcomeNewUserScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/fileManagement/PhotoPickerSection.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/trust/TrustLeaderboardScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/types/navigation.d.ts +20 -19
- package/lib/typescript/module/ui/types/navigation.d.ts.map +1 -1
- 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/netConnectivity.d.ts +17 -0
- package/lib/typescript/module/ui/utils/netConnectivity.d.ts.map +1 -0
- package/lib/typescript/module/ui/utils/oauthReturn.d.ts +15 -12
- package/lib/typescript/module/ui/utils/oauthReturn.d.ts.map +1 -1
- package/package.json +5 -5
- package/src/ui/boot/__tests__/coldBootNoIdpRedirect.test.ts +215 -0
- package/src/ui/boot/runProviderColdBoot.ts +24 -101
- package/src/ui/components/AvatarCameraBadge.tsx +1 -1
- package/src/ui/components/OxyProvider.tsx +5 -6
- package/src/ui/components/ProfileButton.tsx +1 -1
- package/src/ui/components/SettingsIcon.tsx +1 -1
- package/src/ui/components/authChooser/AccountsMenuView.tsx +1 -1
- package/src/ui/components/authChooser/primitives.tsx +1 -1
- package/src/ui/components/authChooser/requestSurfaces.tsx +1 -1
- package/src/ui/components/fileManagement/AnimatedButton.tsx +1 -1
- package/src/ui/components/fileManagement/FileDetailsModal.tsx +1 -1
- package/src/ui/components/fileManagement/FileViewer.tsx +1 -1
- package/src/ui/components/fileManagement/UploadPreview.tsx +1 -1
- package/src/ui/components/modals/DeleteAccountModal.tsx +1 -1
- package/src/ui/components/payment/PaymentDetailsStep.tsx +1 -1
- package/src/ui/components/payment/PaymentMethodStep.tsx +1 -1
- package/src/ui/components/payment/PaymentReviewStep.tsx +1 -1
- package/src/ui/components/payment/PaymentSuccessStep.tsx +1 -1
- package/src/ui/components/payment/PaymentSummaryStep.tsx +1 -1
- package/src/ui/components/payment/types.ts +24 -24
- package/src/ui/components/styles/shadow.tsx +2 -2
- package/src/ui/context/OxyContext.tsx +15 -46
- package/src/ui/context/__tests__/commitSessionFlow.test.ts +0 -89
- package/src/ui/context/commitSessionFlow.ts +0 -61
- package/src/ui/context/oxyContextTypes.ts +4 -7
- package/src/ui/context/useOxyAccountGraph.ts +4 -4
- package/src/ui/hooks/queries/userCache.ts +169 -148
- package/src/ui/hooks/useAssets.ts +1 -1
- package/src/ui/hooks/useAsyncAction.ts +2 -2
- package/src/ui/hooks/useAuth.ts +4 -2
- package/src/ui/hooks/useOnlineStatus.ts +3 -2
- package/src/ui/hooks/useSessionManagement.ts +0 -2
- package/src/ui/screens/AccountMembersScreen.tsx +1 -1
- package/src/ui/screens/ConnectedAppsScreen.tsx +1 -1
- package/src/ui/screens/CreateAccountScreen.tsx +1 -1
- package/src/ui/screens/EditProfileFieldScreen.tsx +1 -1
- package/src/ui/screens/FAQScreen.tsx +1 -1
- package/src/ui/screens/FeedbackScreen.tsx +740 -574
- package/src/ui/screens/FileManagementScreen.tsx +2 -1
- package/src/ui/screens/HistoryViewScreen.tsx +4 -19
- package/src/ui/screens/LanguageSelectorScreen.tsx +1 -1
- package/src/ui/screens/ManageAccountScreen.tsx +1 -1
- package/src/ui/screens/PaymentGatewayScreen.tsx +1 -1
- package/src/ui/screens/PremiumSubscriptionScreen.tsx +2 -2
- package/src/ui/screens/PrivacySettingsScreen.tsx +1 -0
- package/src/ui/screens/ProfileScreen.tsx +6 -4
- package/src/ui/screens/UserListScreen.tsx +3 -3
- package/src/ui/screens/WelcomeNewUserScreen.tsx +6 -6
- package/src/ui/screens/fileManagement/FileLibraryError.tsx +1 -1
- package/src/ui/screens/fileManagement/FileListSection.tsx +1 -1
- package/src/ui/screens/fileManagement/PhotoPickerSection.tsx +3 -2
- package/src/ui/screens/fileManagement/UploadBar.tsx +1 -1
- package/src/ui/screens/trust/TrustCenterScreen.tsx +1 -1
- package/src/ui/screens/trust/TrustLeaderboardScreen.tsx +4 -3
- package/src/ui/screens/trust/TrustRewardsScreen.tsx +1 -1
- package/src/ui/types/navigation.ts +20 -19
- package/src/ui/utils/fileManagement.ts +108 -92
- package/src/ui/utils/netConnectivity.ts +27 -0
- package/src/ui/utils/oauthReturn.ts +15 -30
- package/lib/commonjs/ui/oauth/legacyRedirectLanes.js +0 -48
- package/lib/commonjs/ui/oauth/legacyRedirectLanes.js.map +0 -1
- package/lib/commonjs/ui/utils/crossOriginRestore.js +0 -140
- package/lib/commonjs/ui/utils/crossOriginRestore.js.map +0 -1
- package/lib/module/ui/oauth/legacyRedirectLanes.js +0 -44
- package/lib/module/ui/oauth/legacyRedirectLanes.js.map +0 -1
- package/lib/module/ui/utils/crossOriginRestore.js +0 -131
- package/lib/module/ui/utils/crossOriginRestore.js.map +0 -1
- package/lib/typescript/commonjs/ui/oauth/legacyRedirectLanes.d.ts +0 -40
- package/lib/typescript/commonjs/ui/oauth/legacyRedirectLanes.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/utils/crossOriginRestore.d.ts +0 -43
- package/lib/typescript/commonjs/ui/utils/crossOriginRestore.d.ts.map +0 -1
- package/lib/typescript/module/ui/oauth/legacyRedirectLanes.d.ts +0 -40
- package/lib/typescript/module/ui/oauth/legacyRedirectLanes.d.ts.map +0 -1
- package/lib/typescript/module/ui/utils/crossOriginRestore.d.ts +0 -43
- package/lib/typescript/module/ui/utils/crossOriginRestore.d.ts.map +0 -1
- package/src/ui/boot/__tests__/coldBootWebAuthMode.test.ts +0 -281
- package/src/ui/oauth/legacyRedirectLanes.ts +0 -43
- package/src/ui/utils/__tests__/crossOriginRestore.test.ts +0 -160
- package/src/ui/utils/crossOriginRestore.ts +0 -168
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `runProviderColdBoot` — the boot NEVER navigates the top-level window (#691
|
|
3
|
+
* phase 7b).
|
|
4
|
+
*
|
|
5
|
+
* Phase 7b deleted the two SDK-initiated, gesture-less full-page hops to the
|
|
6
|
+
* IdP: the cold-boot `prompt=none` silent restore and the post-sign-in hub sync.
|
|
7
|
+
* A web origin with no local device credential now resolves SIGNED OUT and waits
|
|
8
|
+
* for the user's next explicit "Continue with Oxy".
|
|
9
|
+
*
|
|
10
|
+
* What must still work — and is asserted here — is everything the user actually
|
|
11
|
+
* asked for: an authorization code ALREADY on the URL is completed, which is how
|
|
12
|
+
* a browser-BLOCKED sign-in popup finishes after `startWebOAuthSignIn` falls
|
|
13
|
+
* back to a full-page redirect.
|
|
14
|
+
*
|
|
15
|
+
* Unlike `__tests__/boot/runProviderColdBoot.test.ts` (deadline + connectivity
|
|
16
|
+
* wiring), this suite keeps the real navigation primitive in view: every
|
|
17
|
+
* assertion below reaches `redirectToAuthorize`, the ONLY top-level-window
|
|
18
|
+
* navigation the boot could ever have performed.
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
import type { AuthStateStore, PersistedAuthState, SessionClient } from '@oxyhq/core';
|
|
22
|
+
|
|
23
|
+
jest.mock('@oxyhq/core', () => {
|
|
24
|
+
const actual = jest.requireActual('@oxyhq/core');
|
|
25
|
+
return {
|
|
26
|
+
__esModule: true,
|
|
27
|
+
...actual,
|
|
28
|
+
runSessionColdBoot: jest.fn(),
|
|
29
|
+
};
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
// The ONLY top-level-window navigation primitive the SDK has.
|
|
33
|
+
jest.mock('../../components/oauthNavigation', () => ({
|
|
34
|
+
redirectToAuthorize: jest.fn(),
|
|
35
|
+
}));
|
|
36
|
+
|
|
37
|
+
jest.mock('../../utils/oauthReturn', () => {
|
|
38
|
+
const actual = jest.requireActual('../../utils/oauthReturn');
|
|
39
|
+
return {
|
|
40
|
+
__esModule: true,
|
|
41
|
+
...actual,
|
|
42
|
+
tryCompleteOAuthReturn: jest.fn(async () => false),
|
|
43
|
+
};
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
import { runSessionColdBoot } from '@oxyhq/core';
|
|
47
|
+
import { redirectToAuthorize } from '../../components/oauthNavigation';
|
|
48
|
+
import { tryCompleteOAuthReturn } from '../../utils/oauthReturn';
|
|
49
|
+
import { runProviderColdBoot, type RunProviderColdBootOptions } from '../runProviderColdBoot';
|
|
50
|
+
|
|
51
|
+
const mockRunSessionColdBoot = runSessionColdBoot as jest.Mock;
|
|
52
|
+
const mockRedirectToAuthorize = redirectToAuthorize as jest.Mock;
|
|
53
|
+
const mockTryCompleteOAuthReturn = tryCompleteOAuthReturn as jest.Mock;
|
|
54
|
+
|
|
55
|
+
const CLIENT_ID = 'oxy_dk_test';
|
|
56
|
+
|
|
57
|
+
/** An auth store holding no device credential — the signed-out domain case. */
|
|
58
|
+
function makeEmptyAuthStore(): AuthStateStore {
|
|
59
|
+
return {
|
|
60
|
+
load: jest.fn(async (): Promise<PersistedAuthState | null> => null),
|
|
61
|
+
save: jest.fn(async () => undefined),
|
|
62
|
+
clear: jest.fn(async () => undefined),
|
|
63
|
+
} as unknown as AuthStateStore;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
interface Harness {
|
|
67
|
+
options: RunProviderColdBootOptions;
|
|
68
|
+
commitSession: jest.Mock;
|
|
69
|
+
markAuthResolved: jest.Mock;
|
|
70
|
+
setTokenReady: jest.Mock;
|
|
71
|
+
sessionClientStart: jest.Mock;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
function makeHarness(overrides: Partial<RunProviderColdBootOptions> = {}): Harness {
|
|
75
|
+
const commitSession = jest.fn(async () => undefined);
|
|
76
|
+
const markAuthResolved = jest.fn();
|
|
77
|
+
const setTokenReady = jest.fn();
|
|
78
|
+
const sessionClientStart = jest.fn(async () => undefined);
|
|
79
|
+
|
|
80
|
+
const options: RunProviderColdBootOptions = {
|
|
81
|
+
oxyServices: {} as RunProviderColdBootOptions['oxyServices'],
|
|
82
|
+
authStore: makeEmptyAuthStore(),
|
|
83
|
+
clientId: CLIENT_ID,
|
|
84
|
+
sessionClient: { start: sessionClientStart } as unknown as SessionClient,
|
|
85
|
+
syncDeviceCredentialToHost: jest.fn(async () => undefined),
|
|
86
|
+
commitSession,
|
|
87
|
+
markAuthResolved,
|
|
88
|
+
setTokenReady,
|
|
89
|
+
...overrides,
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
return { options, commitSession, markAuthResolved, setTokenReady, sessionClientStart };
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/** `runSessionColdBoot` finding no session at all — the signed-out domain. */
|
|
96
|
+
function stubSignedOutBoot(): void {
|
|
97
|
+
mockRunSessionColdBoot.mockImplementation(
|
|
98
|
+
async (opts: Parameters<typeof runSessionColdBoot>[0]) => {
|
|
99
|
+
await opts.onSignedOut?.('no_session');
|
|
100
|
+
return { kind: 'unauthenticated' } as const;
|
|
101
|
+
},
|
|
102
|
+
);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
describe('runProviderColdBoot — no SDK-initiated IdP navigation (#691 phase 7b)', () => {
|
|
106
|
+
beforeEach(() => {
|
|
107
|
+
mockRunSessionColdBoot.mockReset();
|
|
108
|
+
mockRedirectToAuthorize.mockClear();
|
|
109
|
+
mockTryCompleteOAuthReturn.mockClear();
|
|
110
|
+
mockTryCompleteOAuthReturn.mockImplementation(async () => false);
|
|
111
|
+
globalThis.sessionStorage?.clear();
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
it('resolves a domain with no local credential SIGNED OUT instead of bouncing to the IdP', async () => {
|
|
115
|
+
stubSignedOutBoot();
|
|
116
|
+
const { options, markAuthResolved, commitSession, sessionClientStart } = makeHarness();
|
|
117
|
+
|
|
118
|
+
await runProviderColdBoot(options);
|
|
119
|
+
|
|
120
|
+
// Auth resolution concluded (routing can settle), nothing was committed,
|
|
121
|
+
// and with no persisted credential the device socket is not started.
|
|
122
|
+
expect(markAuthResolved).toHaveBeenCalled();
|
|
123
|
+
expect(commitSession).not.toHaveBeenCalled();
|
|
124
|
+
expect(sessionClientStart).not.toHaveBeenCalled();
|
|
125
|
+
expect(mockRedirectToAuthorize).not.toHaveBeenCalled();
|
|
126
|
+
});
|
|
127
|
+
|
|
128
|
+
it('does not navigate even with a clientId configured and the mint finding nothing', async () => {
|
|
129
|
+
// The deleted silent-restore lane needed exactly this shape: a registered
|
|
130
|
+
// client id plus a signed-out mint outcome. It must now be inert.
|
|
131
|
+
stubSignedOutBoot();
|
|
132
|
+
const { options } = makeHarness({ clientId: CLIENT_ID, authRedirectUri: 'https://app.oxy.so' });
|
|
133
|
+
|
|
134
|
+
await runProviderColdBoot(options);
|
|
135
|
+
|
|
136
|
+
expect(mockRedirectToAuthorize).not.toHaveBeenCalled();
|
|
137
|
+
});
|
|
138
|
+
|
|
139
|
+
it('does not navigate when the mint already resolved a session', async () => {
|
|
140
|
+
mockRunSessionColdBoot.mockImplementation(
|
|
141
|
+
async (opts: Parameters<typeof runSessionColdBoot>[0]) => {
|
|
142
|
+
const session = {
|
|
143
|
+
sessionId: 's1',
|
|
144
|
+
userId: 'u1',
|
|
145
|
+
accessToken: 'at',
|
|
146
|
+
via: 'device-secret-mint',
|
|
147
|
+
};
|
|
148
|
+
await opts.onSession?.(session);
|
|
149
|
+
return { kind: 'session', via: session.via, session } as const;
|
|
150
|
+
},
|
|
151
|
+
);
|
|
152
|
+
const { options, commitSession } = makeHarness();
|
|
153
|
+
|
|
154
|
+
await runProviderColdBoot(options);
|
|
155
|
+
|
|
156
|
+
expect(commitSession).toHaveBeenCalledWith(
|
|
157
|
+
{ sessionId: 's1', accessToken: 'at', userId: 'u1' },
|
|
158
|
+
{ activate: false },
|
|
159
|
+
);
|
|
160
|
+
expect(mockRedirectToAuthorize).not.toHaveBeenCalled();
|
|
161
|
+
});
|
|
162
|
+
|
|
163
|
+
describe('the blocked-popup redirect fallback still completes', () => {
|
|
164
|
+
it('completes an authorization code already on the URL', async () => {
|
|
165
|
+
// A popup-mode app lands here whenever the browser blocked the popup and
|
|
166
|
+
// `startWebOAuthSignIn` fell back to a full-page redirect.
|
|
167
|
+
mockTryCompleteOAuthReturn.mockImplementation(async () => true);
|
|
168
|
+
const { options, markAuthResolved, setTokenReady } = makeHarness();
|
|
169
|
+
|
|
170
|
+
await runProviderColdBoot(options);
|
|
171
|
+
|
|
172
|
+
expect(mockTryCompleteOAuthReturn).toHaveBeenCalledTimes(1);
|
|
173
|
+
expect(setTokenReady).toHaveBeenLastCalledWith(true);
|
|
174
|
+
expect(markAuthResolved).toHaveBeenCalled();
|
|
175
|
+
// The device mint is short-circuited by the completed return leg.
|
|
176
|
+
expect(mockRunSessionColdBoot).not.toHaveBeenCalled();
|
|
177
|
+
expect(mockRedirectToAuthorize).not.toHaveBeenCalled();
|
|
178
|
+
});
|
|
179
|
+
|
|
180
|
+
it('runs the return leg even on a boot that finds no session', async () => {
|
|
181
|
+
stubSignedOutBoot();
|
|
182
|
+
const { options } = makeHarness();
|
|
183
|
+
|
|
184
|
+
await runProviderColdBoot(options);
|
|
185
|
+
|
|
186
|
+
expect(mockTryCompleteOAuthReturn).toHaveBeenCalledTimes(1);
|
|
187
|
+
});
|
|
188
|
+
|
|
189
|
+
it('commits the OAuth return as a deliberate sign-in', async () => {
|
|
190
|
+
mockTryCompleteOAuthReturn.mockImplementation(async () => true);
|
|
191
|
+
const { options } = makeHarness();
|
|
192
|
+
|
|
193
|
+
await runProviderColdBoot(options);
|
|
194
|
+
|
|
195
|
+
const commit = mockTryCompleteOAuthReturn.mock.calls[0][0] as {
|
|
196
|
+
commitSession: (input: unknown) => Promise<void>;
|
|
197
|
+
};
|
|
198
|
+
await commit.commitSession({ sessionId: 's1', userId: 'u1' });
|
|
199
|
+
expect(options.commitSession).toHaveBeenCalledWith(
|
|
200
|
+
{ sessionId: 's1', userId: 'u1' },
|
|
201
|
+
{ activate: true },
|
|
202
|
+
);
|
|
203
|
+
});
|
|
204
|
+
});
|
|
205
|
+
|
|
206
|
+
it('identity mode skips the web OAuth return leg entirely', async () => {
|
|
207
|
+
stubSignedOutBoot();
|
|
208
|
+
const { options } = makeHarness({ sessionMode: 'identity' });
|
|
209
|
+
|
|
210
|
+
await runProviderColdBoot(options);
|
|
211
|
+
|
|
212
|
+
expect(mockTryCompleteOAuthReturn).not.toHaveBeenCalled();
|
|
213
|
+
expect(mockRedirectToAuthorize).not.toHaveBeenCalled();
|
|
214
|
+
});
|
|
215
|
+
});
|
|
@@ -8,15 +8,9 @@ import {
|
|
|
8
8
|
} from '@oxyhq/core';
|
|
9
9
|
import type { SessionClient } from '@oxyhq/core';
|
|
10
10
|
import { loadPersistedDeviceCredential } from '../utils/deviceCredential';
|
|
11
|
-
import {
|
|
12
|
-
consumeSilentOAuthError,
|
|
13
|
-
isSilentRestoreEligibleOrigin,
|
|
14
|
-
maybeStartSilentOAuthRestore,
|
|
15
|
-
} from '../utils/crossOriginRestore';
|
|
16
|
-
import { tryCompleteOAuthReturn, consumeHubSyncFailure } from '../utils/oauthReturn';
|
|
11
|
+
import { tryCompleteOAuthReturn } from '../utils/oauthReturn';
|
|
17
12
|
import { isWebBrowser } from '../utils/isWebBrowser';
|
|
18
|
-
import {
|
|
19
|
-
import type { WebAuthMode } from '../oauth/types';
|
|
13
|
+
import { isNetConnectivityExplicitlyOffline } from '../utils/netConnectivity';
|
|
20
14
|
import type { CommitInput } from '../context/oxyContextTypes';
|
|
21
15
|
|
|
22
16
|
/** How long the cold boot waits for the post-boot SessionClient handoff (ms). */
|
|
@@ -67,8 +61,8 @@ async function detectOfflineHint(): Promise<boolean> {
|
|
|
67
61
|
}),
|
|
68
62
|
]);
|
|
69
63
|
// `null` ⇒ the probe timed out (unknown → assume online). Only an explicit
|
|
70
|
-
//
|
|
71
|
-
return state
|
|
64
|
+
// disconnected / unreachable verdict disables the network steps.
|
|
65
|
+
return isNetConnectivityExplicitlyOffline(state);
|
|
72
66
|
} catch {
|
|
73
67
|
// NetInfo missing / probe threw — never block sign-in on a probe failure.
|
|
74
68
|
return false;
|
|
@@ -80,39 +74,19 @@ export interface RunProviderColdBootOptions {
|
|
|
80
74
|
authStore: AuthStateStore;
|
|
81
75
|
clientId?: string;
|
|
82
76
|
authRedirectUri?: string;
|
|
83
|
-
/**
|
|
84
|
-
* Authorize endpoint override for silent cross-origin restore. Defaults to
|
|
85
|
-
* the production Oxy IdP when unset; a local/staging deployment sets it so the
|
|
86
|
-
* silent-restore redirect targets its own IdP, never production.
|
|
87
|
-
*/
|
|
88
|
-
authorizeBaseUrl?: string;
|
|
89
77
|
/**
|
|
90
78
|
* Who owns the session this boot resolves. `'account'` (the default) is the
|
|
91
79
|
* device's active account — every ordinary Oxy app. `'identity'` binds the
|
|
92
80
|
* boot to the owner of this device's PRIMARY identity key and REQUIRES
|
|
93
|
-
* {@link identity}; it also disables the
|
|
94
|
-
*
|
|
81
|
+
* {@link identity}; it also disables the web OAuth return leg below, which
|
|
82
|
+
* commits whatever account the IdP hands back.
|
|
95
83
|
*/
|
|
96
84
|
sessionMode?: SessionMode;
|
|
97
85
|
/** The identity binding required by `sessionMode: 'identity'`. */
|
|
98
86
|
identity?: IdentityBinding;
|
|
99
|
-
/**
|
|
100
|
-
* How this provider's WEB sign-in reaches the IdP
|
|
101
|
-
* (`OxyProviderProps.webAuthMode`).
|
|
102
|
-
*
|
|
103
|
-
* A first-class INPUT to the boot, not a UI-only concern: `'popup'` forbids
|
|
104
|
-
* the automatic full-page `prompt=none` restore in step 3, so a domain with no
|
|
105
|
-
* local credential resolves SIGNED OUT instead of bouncing the top-level
|
|
106
|
-
* window to `auth.oxy.so`. See `allowsAutomaticIdpRedirect`.
|
|
107
|
-
* @default 'redirect'
|
|
108
|
-
*/
|
|
109
|
-
webAuthMode?: WebAuthMode;
|
|
110
87
|
sessionClient: SessionClient;
|
|
111
88
|
syncDeviceCredentialToHost: () => Promise<void>;
|
|
112
|
-
commitSession: (
|
|
113
|
-
input: CommitInput,
|
|
114
|
-
options: { activate: boolean; hubSync?: boolean },
|
|
115
|
-
) => Promise<void>;
|
|
89
|
+
commitSession: (input: CommitInput, options: { activate: boolean }) => Promise<void>;
|
|
116
90
|
markAuthResolved: () => void;
|
|
117
91
|
setTokenReady: (ready: boolean) => void;
|
|
118
92
|
}
|
|
@@ -121,19 +95,19 @@ export interface RunProviderColdBootOptions {
|
|
|
121
95
|
* Device-first cold boot for `@oxyhq/services` providers.
|
|
122
96
|
*
|
|
123
97
|
* Ordered pipeline:
|
|
124
|
-
* 1. Complete OAuth authorization-code return (web)
|
|
98
|
+
* 1. Complete an OAuth authorization-code return already on the URL (web)
|
|
125
99
|
* 2. `runSessionColdBoot` — device-secret mint (+ native shared-key, or the
|
|
126
100
|
* primary-identity-key lane in `sessionMode: 'identity'`)
|
|
127
|
-
* 3. Silent OAuth for all web apps when mint finds no session
|
|
128
101
|
*
|
|
129
|
-
*
|
|
130
|
-
*
|
|
131
|
-
*
|
|
102
|
+
* Step 1 is ACCOUNT-MODE ONLY: it commits whichever account the IdP resolves,
|
|
103
|
+
* which for an identity-bound client is somebody else's account by construction.
|
|
104
|
+
* In `'identity'` mode the boot is exactly step 2.
|
|
132
105
|
*
|
|
133
|
-
*
|
|
134
|
-
*
|
|
135
|
-
*
|
|
136
|
-
*
|
|
106
|
+
* The boot NEVER navigates the top-level window. There is no automatic
|
|
107
|
+
* `prompt=none` bounce to the IdP: a web origin with no local device credential
|
|
108
|
+
* resolves SIGNED OUT and waits for the user's next explicit "Continue with
|
|
109
|
+
* Oxy", which opens a popup from a real gesture (#691 phase 7b). Step 1 is not a
|
|
110
|
+
* navigation — it only consumes a code that is already in the address bar.
|
|
137
111
|
*/
|
|
138
112
|
export async function runProviderColdBoot(opts: RunProviderColdBootOptions): Promise<void> {
|
|
139
113
|
const {
|
|
@@ -141,10 +115,8 @@ export async function runProviderColdBoot(opts: RunProviderColdBootOptions): Pro
|
|
|
141
115
|
authStore,
|
|
142
116
|
clientId,
|
|
143
117
|
authRedirectUri,
|
|
144
|
-
authorizeBaseUrl,
|
|
145
118
|
sessionMode = 'account',
|
|
146
119
|
identity,
|
|
147
|
-
webAuthMode = 'redirect',
|
|
148
120
|
sessionClient,
|
|
149
121
|
syncDeviceCredentialToHost,
|
|
150
122
|
commitSession,
|
|
@@ -157,28 +129,19 @@ export async function runProviderColdBoot(opts: RunProviderColdBootOptions): Pro
|
|
|
157
129
|
setTokenReady(false);
|
|
158
130
|
|
|
159
131
|
try {
|
|
160
|
-
//
|
|
161
|
-
//
|
|
162
|
-
//
|
|
163
|
-
//
|
|
164
|
-
//
|
|
165
|
-
//
|
|
166
|
-
consumeSilentOAuthError();
|
|
167
|
-
consumeHubSyncFailure();
|
|
168
|
-
|
|
169
|
-
// The redirect transport's RETURN leg — also NOT gated on `webAuthMode`. A
|
|
170
|
-
// popup-mode app legitimately lands here with `?code=` whenever the browser
|
|
171
|
-
// blocked the popup and `startWebOAuthSignIn` fell back to a full-page
|
|
172
|
-
// redirect (`popup-blocked` / `popup-navigation-failed`), and an app that
|
|
173
|
-
// switched modes mid-flight must not be stranded with a dead `?code=`
|
|
174
|
-
// either. It consumes a code already on the URL; it never starts one.
|
|
132
|
+
// The redirect transport's RETURN leg. An app reaches it whenever the browser
|
|
133
|
+
// BLOCKED the sign-in popup and `startWebOAuthSignIn` fell back to a
|
|
134
|
+
// full-page redirect (`popup-blocked` / `popup-navigation-failed`), so it is
|
|
135
|
+
// load-bearing even though nothing here ever starts a redirect. It consumes a
|
|
136
|
+
// code (or a stale OAuth `error`) already in the address bar and rewrites the
|
|
137
|
+
// URL via `history.replaceState`; it never begins a navigation.
|
|
175
138
|
const oauthCompleted = identityBound
|
|
176
139
|
? false
|
|
177
140
|
: await tryCompleteOAuthReturn({
|
|
178
141
|
oxyServices,
|
|
179
142
|
clientId,
|
|
180
143
|
authRedirectUri,
|
|
181
|
-
commitSession: (input) => commitSession(input, { activate: true
|
|
144
|
+
commitSession: (input) => commitSession(input, { activate: true }),
|
|
182
145
|
});
|
|
183
146
|
if (oauthCompleted) {
|
|
184
147
|
setTokenReady(true);
|
|
@@ -192,7 +155,7 @@ export async function runProviderColdBoot(opts: RunProviderColdBootOptions): Pro
|
|
|
192
155
|
// resolves to "online" — the network steps still run.
|
|
193
156
|
const offline = await detectOfflineHint();
|
|
194
157
|
|
|
195
|
-
|
|
158
|
+
await runSessionColdBoot({
|
|
196
159
|
oxy: oxyServices,
|
|
197
160
|
store: authStore,
|
|
198
161
|
platform: { isWeb: isWebBrowser(), isNative: !isWebBrowser() },
|
|
@@ -259,46 +222,6 @@ export async function runProviderColdBoot(opts: RunProviderColdBootOptions): Pro
|
|
|
259
222
|
}
|
|
260
223
|
},
|
|
261
224
|
});
|
|
262
|
-
|
|
263
|
-
// Silent cross-origin OAuth restore (web cross-app SSO): a full-page
|
|
264
|
-
// `prompt=none` bounce to the IdP when the mint found no local session.
|
|
265
|
-
//
|
|
266
|
-
// TRANSPORT gate (`allowsAutomaticIdpRedirect`): `webAuthMode: 'popup'`
|
|
267
|
-
// FORBIDS this lane. It navigates the top-level window with no user gesture
|
|
268
|
-
// behind it, which is precisely what popup mode exists to eliminate — a
|
|
269
|
-
// popup-mode domain without a local credential resolves signed out right
|
|
270
|
-
// here and waits for the user's next explicit "Continue with Oxy" (issue
|
|
271
|
-
// #691, "Cold boot and cross-domain behavior"). `'redirect'` — still the
|
|
272
|
-
// default and the compatibility path — reaches this lane unchanged, and this
|
|
273
|
-
// whole block disappears with the transport in phase 7b.
|
|
274
|
-
//
|
|
275
|
-
// ORIGIN gate: same as the hub-sync WRITE side (`syncHubAfterSignIn`) —
|
|
276
|
-
// official web origins only, never the IdP hub itself, and — unlike the
|
|
277
|
-
// write side — never a loopback / local-dev origin (which must not be
|
|
278
|
-
// bounced to a hosted IdP on cold boot). The authorize endpoint is
|
|
279
|
-
// env-configurable so a local/staging app targets its own IdP instead of
|
|
280
|
-
// production.
|
|
281
|
-
const webOrigin = isWebBrowser()
|
|
282
|
-
? (globalThis as { location?: Location }).location?.origin
|
|
283
|
-
: undefined;
|
|
284
|
-
if (
|
|
285
|
-
!identityBound &&
|
|
286
|
-
allowsAutomaticIdpRedirect(webAuthMode) &&
|
|
287
|
-
clientId &&
|
|
288
|
-
outcome.kind !== 'session' &&
|
|
289
|
-
webOrigin &&
|
|
290
|
-
isSilentRestoreEligibleOrigin(webOrigin)
|
|
291
|
-
) {
|
|
292
|
-
const redirected = await maybeStartSilentOAuthRestore({
|
|
293
|
-
oxyServices,
|
|
294
|
-
clientId,
|
|
295
|
-
redirectUri: authRedirectUri,
|
|
296
|
-
authorizeBaseUrl,
|
|
297
|
-
});
|
|
298
|
-
if (redirected) {
|
|
299
|
-
return;
|
|
300
|
-
}
|
|
301
|
-
}
|
|
302
225
|
} catch (error) {
|
|
303
226
|
if (__DEV__) {
|
|
304
227
|
loggerUtil.error(
|
|
@@ -12,6 +12,7 @@ import { logger as loggerUtil } from '@oxyhq/core';
|
|
|
12
12
|
import { RequireOxyAuth } from './RequireOxyAuth';
|
|
13
13
|
import { attachQueryPersistence, createQueryClient } from '../hooks/queryClient';
|
|
14
14
|
import { createPlatformStorage, type StorageInterface } from '../utils/storageHelpers';
|
|
15
|
+
import { isNetConnectivityOnline } from '../utils/netConnectivity';
|
|
15
16
|
|
|
16
17
|
/**
|
|
17
18
|
* Background color shown for the brief window between mount and the
|
|
@@ -92,10 +93,9 @@ const OxyProvider: FC<OxyProviderProps> = ({
|
|
|
92
93
|
authRedirectUri,
|
|
93
94
|
authorizeBaseUrl,
|
|
94
95
|
sessionMode = 'account',
|
|
95
|
-
webAuthMode = '
|
|
96
|
+
webAuthMode = 'popup',
|
|
96
97
|
queryClient: providedQueryClient,
|
|
97
98
|
requireAuth = 'off',
|
|
98
|
-
hubSync = true,
|
|
99
99
|
}) => {
|
|
100
100
|
|
|
101
101
|
// Dynamic KeyboardProvider for native. Uses variable indirection
|
|
@@ -230,10 +230,10 @@ const OxyProvider: FC<OxyProviderProps> = ({
|
|
|
230
230
|
try {
|
|
231
231
|
const NetInfo = await import('@react-native-community/netinfo');
|
|
232
232
|
const state = await NetInfo.default.fetch();
|
|
233
|
-
onlineManager.setOnline(state
|
|
233
|
+
onlineManager.setOnline(isNetConnectivityOnline(state));
|
|
234
234
|
|
|
235
|
-
const unsubscribe = NetInfo.default.addEventListener((state: { isConnected: boolean | null }) => {
|
|
236
|
-
onlineManager.setOnline(state
|
|
235
|
+
const unsubscribe = NetInfo.default.addEventListener((state: { isConnected: boolean | null; isInternetReachable?: boolean | null }) => {
|
|
236
|
+
onlineManager.setOnline(isNetConnectivityOnline(state));
|
|
237
237
|
});
|
|
238
238
|
|
|
239
239
|
cleanup = () => unsubscribe();
|
|
@@ -293,7 +293,6 @@ const OxyProvider: FC<OxyProviderProps> = ({
|
|
|
293
293
|
clientId={clientId}
|
|
294
294
|
sessionMode={sessionMode}
|
|
295
295
|
webAuthMode={webAuthMode}
|
|
296
|
-
hubSync={hubSync}
|
|
297
296
|
onAuthStateChange={onAuthStateChange as OxyContextProviderProps['onAuthStateChange']}
|
|
298
297
|
>
|
|
299
298
|
<SurfaceProvider>
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
type StyleProp,
|
|
9
9
|
type ViewStyle,
|
|
10
10
|
} from 'react-native';
|
|
11
|
-
import
|
|
11
|
+
import MaterialCommunityIcons from '@expo/vector-icons/MaterialCommunityIcons';
|
|
12
12
|
import { Avatar } from '@oxyhq/bloom/avatar';
|
|
13
13
|
import * as Skeleton from '@oxyhq/bloom/skeleton';
|
|
14
14
|
import { Text } from '@oxyhq/bloom/typography';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
import { memo } from 'react';
|
|
3
3
|
import { View, StyleSheet } from 'react-native';
|
|
4
|
-
import
|
|
4
|
+
import MaterialCommunityIcons from '@expo/vector-icons/MaterialCommunityIcons';
|
|
5
5
|
import { darkenColor } from '../utils/colorUtils';
|
|
6
6
|
|
|
7
7
|
interface SettingsIconProps {
|
|
@@ -33,7 +33,7 @@ import Animated, {
|
|
|
33
33
|
useSharedValue,
|
|
34
34
|
withTiming,
|
|
35
35
|
} from 'react-native-reanimated';
|
|
36
|
-
import
|
|
36
|
+
import MaterialCommunityIcons from '@expo/vector-icons/MaterialCommunityIcons';
|
|
37
37
|
import { Avatar } from '@oxyhq/bloom/avatar';
|
|
38
38
|
import { AvatarGroup, type AvatarGroupItem } from '@oxyhq/bloom/avatar-group';
|
|
39
39
|
import { Button } from '@oxyhq/bloom/button';
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
import type React from 'react';
|
|
8
8
|
import { useState } from 'react';
|
|
9
9
|
import { Pressable, View } from 'react-native';
|
|
10
|
-
import
|
|
10
|
+
import MaterialCommunityIcons from '@expo/vector-icons/MaterialCommunityIcons';
|
|
11
11
|
import { Avatar } from '@oxyhq/bloom/avatar';
|
|
12
12
|
import { Text } from '@oxyhq/bloom/typography';
|
|
13
13
|
import { BloomColorScope } from '@oxyhq/bloom/theme';
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
import type React from 'react';
|
|
16
16
|
import { View } from 'react-native';
|
|
17
|
-
import
|
|
17
|
+
import MaterialCommunityIcons from '@expo/vector-icons/MaterialCommunityIcons';
|
|
18
18
|
import QRCode from 'react-native-qrcode-svg';
|
|
19
19
|
import { Button } from '@oxyhq/bloom/button';
|
|
20
20
|
import { Loading } from '@oxyhq/bloom/loading';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
import { useEffect, useRef } from 'react';
|
|
3
3
|
import { TouchableOpacity, Animated, Easing } from 'react-native';
|
|
4
|
-
import
|
|
4
|
+
import MaterialCommunityIcons from '@expo/vector-icons/MaterialCommunityIcons';
|
|
5
5
|
|
|
6
6
|
interface AnimatedButtonProps {
|
|
7
7
|
isSelected: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
import { View, Text } from 'react-native';
|
|
3
|
-
import
|
|
3
|
+
import Ionicons from '@expo/vector-icons/Ionicons';
|
|
4
4
|
import { Button } from '@oxyhq/bloom/button';
|
|
5
5
|
import { useTheme } from '@oxyhq/bloom/theme';
|
|
6
6
|
import { surfaces, type SurfaceControls } from '@oxyhq/bloom/surfaces';
|
|
@@ -2,7 +2,7 @@ import type React from 'react';
|
|
|
2
2
|
import { useMemo, useState, useEffect } from 'react';
|
|
3
3
|
import { View, Text, TouchableOpacity, ScrollView, ActivityIndicator, Image, StyleSheet } from 'react-native';
|
|
4
4
|
import { Image as ExpoImage } from 'expo-image';
|
|
5
|
-
import
|
|
5
|
+
import MaterialCommunityIcons from '@expo/vector-icons/MaterialCommunityIcons';
|
|
6
6
|
import { useTheme } from '@oxyhq/bloom/theme';
|
|
7
7
|
import type { FileMetadata } from '@oxyhq/core';
|
|
8
8
|
import { formatFileSize } from '../../utils/fileManagement';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
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
|
-
import
|
|
4
|
+
import Ionicons from '@expo/vector-icons/Ionicons';
|
|
5
5
|
import { Dialog, type DialogControlProps } from '@oxyhq/bloom';
|
|
6
6
|
import { useTheme } from '@oxyhq/bloom/theme';
|
|
7
7
|
import { formatFileSize, getFileIcon } from '../../utils/fileManagement';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
import { useState, useCallback } from 'react';
|
|
3
3
|
import { View, Text, TextInput } from 'react-native';
|
|
4
|
-
import
|
|
4
|
+
import Ionicons from '@expo/vector-icons/Ionicons';
|
|
5
5
|
import { Button } from '@oxyhq/bloom/button';
|
|
6
6
|
import { useTheme } from '@oxyhq/bloom/theme';
|
|
7
7
|
import { surfaces, type SurfaceControls } from '@oxyhq/bloom/surfaces';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
import { useMemo } from 'react';
|
|
3
3
|
import { View, Text, Animated, TouchableOpacity, Clipboard, Linking } from 'react-native';
|
|
4
|
-
import
|
|
4
|
+
import Ionicons from '@expo/vector-icons/Ionicons';
|
|
5
5
|
import { Button } from '@oxyhq/bloom/button';
|
|
6
6
|
import { TextField, TextFieldInput } from '@oxyhq/bloom/text-field';
|
|
7
7
|
import FAIRWalletIcon from '../icon/FAIRWalletIcon';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
import { useMemo } from 'react';
|
|
3
3
|
import { View, Text, Animated } from 'react-native';
|
|
4
|
-
import
|
|
4
|
+
import Ionicons from '@expo/vector-icons/Ionicons';
|
|
5
5
|
import { SettingsListGroup, SettingsListItem } from '@oxyhq/bloom/settings-list';
|
|
6
6
|
import { Button } from '@oxyhq/bloom/button';
|
|
7
7
|
import FAIRWalletIcon from '../icon/FAIRWalletIcon';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
import { useMemo } from 'react';
|
|
3
3
|
import { View, Text, Animated, ActivityIndicator } from 'react-native';
|
|
4
|
-
import
|
|
4
|
+
import Ionicons from '@expo/vector-icons/Ionicons';
|
|
5
5
|
import { SettingsListGroup, SettingsListItem } from '@oxyhq/bloom/settings-list';
|
|
6
6
|
import { Button } from '@oxyhq/bloom/button';
|
|
7
7
|
import { createPaymentStyles } from './paymentStyles';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
import { useMemo } from 'react';
|
|
3
3
|
import { View, Text, Animated } from 'react-native';
|
|
4
|
-
import
|
|
4
|
+
import Ionicons from '@expo/vector-icons/Ionicons';
|
|
5
5
|
import { Button } from '@oxyhq/bloom/button';
|
|
6
6
|
import { createPaymentStyles } from './paymentStyles';
|
|
7
7
|
import type { PaymentColors, PaymentStepAnimations } from './types';
|
|
@@ -2,7 +2,7 @@ import type React from 'react';
|
|
|
2
2
|
import type { ComponentProps } from 'react';
|
|
3
3
|
import { useMemo } from 'react';
|
|
4
4
|
import { View, Text, Animated } from 'react-native';
|
|
5
|
-
import
|
|
5
|
+
import Ionicons from '@expo/vector-icons/Ionicons';
|
|
6
6
|
import { SettingsListGroup, SettingsListItem } from '@oxyhq/bloom/settings-list';
|
|
7
7
|
import { Button } from '@oxyhq/bloom/button';
|
|
8
8
|
import { createPaymentStyles } from './paymentStyles';
|