@oxyhq/services 22.13.0 → 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/index.js +74 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/notifications/deviceNotifications.js +424 -0
- package/lib/commonjs/notifications/deviceNotifications.js.map +1 -0
- 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/OxyAuthChooser.js +5 -4
- package/lib/commonjs/ui/components/OxyAuthChooser.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/OxySignInRequestSurface.js +147 -0
- package/lib/commonjs/ui/components/OxySignInRequestSurface.js.map +1 -0
- 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/SignInEntryView.js.map +1 -1
- package/lib/commonjs/ui/components/authChooser/SignInRequestView.js +65 -103
- package/lib/commonjs/ui/components/authChooser/SignInRequestView.js.map +1 -1
- package/lib/commonjs/ui/components/authChooser/TroubleDisclosure.js +0 -2
- package/lib/commonjs/ui/components/authChooser/TroubleDisclosure.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 +14 -10
- package/lib/commonjs/ui/components/authChooser/requestSurfaces.js.map +1 -1
- package/lib/commonjs/ui/components/authChooser/types.js +11 -0
- package/lib/commonjs/ui/components/authChooser/types.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/index.js +18 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/notifications/deviceNotifications.js +414 -0
- package/lib/module/notifications/deviceNotifications.js.map +1 -0
- 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/OxyAuthChooser.js +5 -4
- package/lib/module/ui/components/OxyAuthChooser.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/OxySignInRequestSurface.js +141 -0
- package/lib/module/ui/components/OxySignInRequestSurface.js.map +1 -0
- 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/SignInEntryView.js.map +1 -1
- package/lib/module/ui/components/authChooser/SignInRequestView.js +66 -104
- package/lib/module/ui/components/authChooser/SignInRequestView.js.map +1 -1
- package/lib/module/ui/components/authChooser/TroubleDisclosure.js +0 -2
- package/lib/module/ui/components/authChooser/TroubleDisclosure.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 +13 -9
- package/lib/module/ui/components/authChooser/requestSurfaces.js.map +1 -1
- package/lib/module/ui/components/authChooser/types.js +11 -0
- package/lib/module/ui/components/authChooser/types.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/index.d.ts +5 -0
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/notifications/deviceNotifications.d.ts +173 -0
- package/lib/typescript/commonjs/notifications/deviceNotifications.d.ts.map +1 -0
- 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/OxyAuthChooser.d.ts +5 -3
- 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/OxySignInRequestSurface.d.ts +108 -0
- package/lib/typescript/commonjs/ui/components/OxySignInRequestSurface.d.ts.map +1 -0
- 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/SignInEntryView.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/authChooser/SignInRequestView.d.ts +18 -18
- package/lib/typescript/commonjs/ui/components/authChooser/SignInRequestView.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/authChooser/TroubleDisclosure.d.ts +3 -10
- package/lib/typescript/commonjs/ui/components/authChooser/TroubleDisclosure.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/authChooser/requestSurfaces.d.ts +8 -4
- package/lib/typescript/commonjs/ui/components/authChooser/requestSurfaces.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/authChooser/types.d.ts +18 -0
- package/lib/typescript/commonjs/ui/components/authChooser/types.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/index.d.ts +5 -0
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/lib/typescript/module/notifications/deviceNotifications.d.ts +173 -0
- package/lib/typescript/module/notifications/deviceNotifications.d.ts.map +1 -0
- 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/OxyAuthChooser.d.ts +5 -3
- 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/OxySignInRequestSurface.d.ts +108 -0
- package/lib/typescript/module/ui/components/OxySignInRequestSurface.d.ts.map +1 -0
- 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/SignInEntryView.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/authChooser/SignInRequestView.d.ts +18 -18
- package/lib/typescript/module/ui/components/authChooser/SignInRequestView.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/authChooser/TroubleDisclosure.d.ts +3 -10
- package/lib/typescript/module/ui/components/authChooser/TroubleDisclosure.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/authChooser/requestSurfaces.d.ts +8 -4
- package/lib/typescript/module/ui/components/authChooser/requestSurfaces.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/authChooser/types.d.ts +18 -0
- package/lib/typescript/module/ui/components/authChooser/types.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 +18 -8
- package/src/index.ts +32 -0
- package/src/notifications/deviceNotifications.ts +458 -0
- 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/OxyAuthChooser.tsx +5 -4
- package/src/ui/components/OxyProvider.tsx +5 -6
- package/src/ui/components/OxySignInRequestSurface.tsx +202 -0
- 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/SignInEntryView.tsx +9 -3
- package/src/ui/components/authChooser/SignInRequestView.tsx +78 -111
- package/src/ui/components/authChooser/TroubleDisclosure.tsx +3 -11
- package/src/ui/components/authChooser/primitives.tsx +1 -1
- package/src/ui/components/authChooser/requestSurfaces.tsx +15 -11
- package/src/ui/components/authChooser/types.ts +19 -0
- 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
|
@@ -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(
|
|
@@ -20,9 +20,11 @@
|
|
|
20
20
|
* auto-starts the instant the view is reached, because the request surface
|
|
21
21
|
* (a QR on an unknown desktop, "Check Commons on your phone" where Oxy could
|
|
22
22
|
* deliver) IS the primary route there, never something behind a second tap.
|
|
23
|
-
* - `qr` → `SignInRequestView` — the ACTIVE REQUEST: the
|
|
24
|
-
*
|
|
25
|
-
*
|
|
23
|
+
* - `qr` → `SignInRequestView` — the ACTIVE REQUEST: the controller-bound
|
|
24
|
+
* wiring over the shared, presentational `OxySignInRequestSurface` (the same
|
|
25
|
+
* component the auth.oxy.so IdP mounts from its OAuth-bound request). It maps
|
|
26
|
+
* `snapshot.signIn` onto that surface's props; alternatives stay behind
|
|
27
|
+
* "Having trouble?" until the chosen route reports `routeFailed`.
|
|
26
28
|
* - `signup` → `SignUpView` — account creation, Commons-first.
|
|
27
29
|
*
|
|
28
30
|
* Per-account color re-theming uses Bloom's `APP_COLOR_PRESETS` + `BloomColorScope`
|
|
@@ -376,7 +378,6 @@ const OxyAuthChooser: React.FC<OxyAuthChooserProps> = ({
|
|
|
376
378
|
return (
|
|
377
379
|
<SignInRequestView
|
|
378
380
|
snapshot={snapshot}
|
|
379
|
-
theme={theme}
|
|
380
381
|
t={t}
|
|
381
382
|
onRetry={() => void controller.showQr()}
|
|
382
383
|
alternatives={alternatives}
|
|
@@ -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>
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `OxySignInRequestSurface` — the in-flight "Sign in with Oxy" request, rendered
|
|
3
|
+
* from plain facts (issue #691, Phase 5).
|
|
4
|
+
*
|
|
5
|
+
* The user already performed their one action. From here the surface only
|
|
6
|
+
* REPORTS: the route-appropriate primary visual, the status line for the
|
|
7
|
+
* progress it was told about, and nothing else at the same weight. Alternatives
|
|
8
|
+
* stay behind "Having trouble?" until the chosen route could not be carried out,
|
|
9
|
+
* at which point they ARE the content and render plainly.
|
|
10
|
+
*
|
|
11
|
+
* PRESENTATIONAL AND HEADLESS-FRIENDLY. It owns no request, no controller, no
|
|
12
|
+
* polling, and no state of its own: everything it draws is a prop. That is what
|
|
13
|
+
* lets the two hosts of this surface share ONE implementation —
|
|
14
|
+
*
|
|
15
|
+
* - `OxyAuthChooser`'s `SignInRequestView`, driven by `AccountDialogController`'s
|
|
16
|
+
* device flow;
|
|
17
|
+
* - the auth.oxy.so IdP's OAuth-bound lane, whose request carries an OAuth
|
|
18
|
+
* binding the account dialog's session has no concept of.
|
|
19
|
+
*
|
|
20
|
+
* It resolves only what every `@oxyhq/services` consumer already has in context:
|
|
21
|
+
* the Bloom theme (`useTheme`) and the SDK's own locale dictionary (`useI18n`,
|
|
22
|
+
* the `accountSwitcher.*` copy in all 11 locales). Host-specific copy — the
|
|
23
|
+
* labels on {@link OxySignInRequestSurfaceProps.subordinate} and
|
|
24
|
+
* {@link OxySignInRequestSurfaceProps.alternatives} — arrives already localized.
|
|
25
|
+
*
|
|
26
|
+
* TWO THINGS IT DELIBERATELY DOES NOT DO:
|
|
27
|
+
* - it renders no failure REASON. A host surfaces that the way its own shell
|
|
28
|
+
* demands (the account dialog toasts it — errors never render inline there;
|
|
29
|
+
* a full page may show a banner around this surface). The surface only takes
|
|
30
|
+
* the fact that the request failed, and offers the way forward.
|
|
31
|
+
* - it derives nothing from {@link OxySignInRequestSurfaceProps.qrPayload}.
|
|
32
|
+
* Application identity, origin, and scopes are resolved server-side by the
|
|
33
|
+
* approver (Commons), never read out of a payload here — the plate encodes it
|
|
34
|
+
* and shows nothing about it.
|
|
35
|
+
*
|
|
36
|
+
* SECRETS: every prop is safe to render. There is no `sessionToken` (the secret
|
|
37
|
+
* claim/finalize credential), no bearer, and no authorization code — a host
|
|
38
|
+
* keeps those in its own controller, and no prop on this component invites one.
|
|
39
|
+
*/
|
|
40
|
+
|
|
41
|
+
import type React from 'react';
|
|
42
|
+
import { View } from 'react-native';
|
|
43
|
+
import { Button } from '@oxyhq/bloom/button';
|
|
44
|
+
import { useTheme } from '@oxyhq/bloom/theme';
|
|
45
|
+
import { Text } from '@oxyhq/bloom/typography';
|
|
46
|
+
import type { CommonsDeliveryRoute, SignInProgress } from '@oxyhq/core';
|
|
47
|
+
import { useI18n } from '../hooks/useI18n';
|
|
48
|
+
import TroubleDisclosure from './authChooser/TroubleDisclosure';
|
|
49
|
+
import { SubtleLink } from './authChooser/primitives';
|
|
50
|
+
import { GetCommonsPrompt, RequestPrimarySurface } from './authChooser/requestSurfaces';
|
|
51
|
+
import { signInProgressLabel } from './authChooser/signInProgress';
|
|
52
|
+
import { authChooserStyles as styles } from './authChooser/styles';
|
|
53
|
+
import type { OxySignInSurfaceAction } from './authChooser/types';
|
|
54
|
+
|
|
55
|
+
/** Shared empty list, so an omitted action bundle allocates nothing per render. */
|
|
56
|
+
const NO_ACTIONS: readonly OxySignInSurfaceAction[] = [];
|
|
57
|
+
|
|
58
|
+
export interface OxySignInRequestSurfaceProps {
|
|
59
|
+
/**
|
|
60
|
+
* The ONE primary delivery route chosen for this request, or `null` while it
|
|
61
|
+
* is still being resolved. There is no chain: the surface renders exactly one
|
|
62
|
+
* route's visual, and never guesses one that has not been chosen yet.
|
|
63
|
+
*/
|
|
64
|
+
route: CommonsDeliveryRoute | null;
|
|
65
|
+
/**
|
|
66
|
+
* The request's DERIVED progress — the only thing the status line is built
|
|
67
|
+
* from. It must come from a real observed signal (a server-reported delivery,
|
|
68
|
+
* an approver opening the request, an approval); the surface owns no clock and
|
|
69
|
+
* will never advance it on its own. `'idle'` means there is nothing honest to
|
|
70
|
+
* report, and renders no status line.
|
|
71
|
+
*/
|
|
72
|
+
progress: SignInProgress;
|
|
73
|
+
/**
|
|
74
|
+
* The PUBLIC `oxycommons://approve?…` payload to encode as the QR, or `null`.
|
|
75
|
+
* It carries the single-use approval handle — never a secret credential — and
|
|
76
|
+
* the surface renders NOTHING derived from it.
|
|
77
|
+
*/
|
|
78
|
+
qrPayload?: string | null;
|
|
79
|
+
/**
|
|
80
|
+
* `true` when the chosen primary route could not be carried out on this device.
|
|
81
|
+
* The one signal that reveals {@link alternatives} without the user asking;
|
|
82
|
+
* a host never silently cascades to another route on its own.
|
|
83
|
+
*/
|
|
84
|
+
routeFailed?: boolean;
|
|
85
|
+
/**
|
|
86
|
+
* `true` when the request itself is terminally failed — there is no working
|
|
87
|
+
* primary route left to report on, so {@link onRetry} becomes the surface's one
|
|
88
|
+
* primary action and the alternatives render plainly.
|
|
89
|
+
*/
|
|
90
|
+
failed?: boolean;
|
|
91
|
+
/**
|
|
92
|
+
* Start a BRAND-NEW request. Rendered as the primary action while
|
|
93
|
+
* {@link failed}; omit it when a fresh attempt cannot help (a request that
|
|
94
|
+
* would fail identically every time), leaving the alternatives as the only
|
|
95
|
+
* way forward.
|
|
96
|
+
*/
|
|
97
|
+
onRetry?: () => void;
|
|
98
|
+
/**
|
|
99
|
+
* The acquisition action for a device where Commons is known to be ABSENT.
|
|
100
|
+
*
|
|
101
|
+
* Pass it ONLY on a positive "not installed" verdict. There, acquiring Commons
|
|
102
|
+
* is the GENUINE primary route — a same-device QR the user would have to scan
|
|
103
|
+
* with the very screen showing it is a dead end — so the surface leads with it
|
|
104
|
+
* and reports no route progress. Omit it wherever absence cannot be known (a
|
|
105
|
+
* browser cannot ask whether a URL scheme is registered).
|
|
106
|
+
*/
|
|
107
|
+
onAcquireCommons?: () => void;
|
|
108
|
+
/**
|
|
109
|
+
* Subordinate links rendered directly beneath the primary, always visible:
|
|
110
|
+
* the ways OUT of the surface that are not troubleshooting (creating an
|
|
111
|
+
* account, cancelling the request).
|
|
112
|
+
*/
|
|
113
|
+
subordinate?: readonly OxySignInSurfaceAction[];
|
|
114
|
+
/**
|
|
115
|
+
* The alternative ways to authenticate, kept behind "Having trouble?" until
|
|
116
|
+
* the user asks — or shown plainly once {@link failed} / {@link routeFailed}
|
|
117
|
+
* says the chosen route cannot deliver.
|
|
118
|
+
*/
|
|
119
|
+
alternatives?: readonly OxySignInSurfaceAction[];
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export const OxySignInRequestSurface: React.FC<OxySignInRequestSurfaceProps> = ({
|
|
123
|
+
route,
|
|
124
|
+
progress,
|
|
125
|
+
qrPayload = null,
|
|
126
|
+
routeFailed = false,
|
|
127
|
+
failed = false,
|
|
128
|
+
onRetry,
|
|
129
|
+
onAcquireCommons,
|
|
130
|
+
subordinate = NO_ACTIONS,
|
|
131
|
+
alternatives = NO_ACTIONS,
|
|
132
|
+
}) => {
|
|
133
|
+
const theme = useTheme();
|
|
134
|
+
const { t } = useI18n();
|
|
135
|
+
|
|
136
|
+
const subordinateLinks = subordinate.map((action) => (
|
|
137
|
+
<SubtleLink
|
|
138
|
+
key={action.key}
|
|
139
|
+
label={action.label}
|
|
140
|
+
theme={theme}
|
|
141
|
+
onPress={action.onPress}
|
|
142
|
+
disabled={action.disabled}
|
|
143
|
+
testID={action.key}
|
|
144
|
+
/>
|
|
145
|
+
));
|
|
146
|
+
|
|
147
|
+
// A failed request has no working primary route left. Its REASON is the host's
|
|
148
|
+
// to surface (toast / banner); all this owes the user is the way forward.
|
|
149
|
+
if (failed) {
|
|
150
|
+
return (
|
|
151
|
+
<View style={styles.centeredBlock}>
|
|
152
|
+
{onRetry ? (
|
|
153
|
+
<Button variant="primary" onPress={onRetry} style={styles.primaryButton}>
|
|
154
|
+
{t('common.actions.tryAgain')}
|
|
155
|
+
</Button>
|
|
156
|
+
) : null}
|
|
157
|
+
{subordinateLinks}
|
|
158
|
+
<TroubleDisclosure actions={alternatives} revealed theme={theme} t={t} />
|
|
159
|
+
</View>
|
|
160
|
+
);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
// Commons is absent: acquiring it IS the primary route, not a fallback, so it
|
|
164
|
+
// renders as the one primary action and no route progress is reported (there is
|
|
165
|
+
// no route to report on until the host says otherwise).
|
|
166
|
+
if (onAcquireCommons) {
|
|
167
|
+
return (
|
|
168
|
+
<View style={styles.centeredBlock}>
|
|
169
|
+
<GetCommonsPrompt theme={theme} t={t} onGetCommons={onAcquireCommons} />
|
|
170
|
+
{subordinateLinks}
|
|
171
|
+
<TroubleDisclosure actions={alternatives} revealed={false} theme={theme} t={t} />
|
|
172
|
+
</View>
|
|
173
|
+
);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
const status = signInProgressLabel(progress, route, t);
|
|
177
|
+
|
|
178
|
+
return (
|
|
179
|
+
<View style={styles.centeredBlock}>
|
|
180
|
+
<RequestPrimarySurface
|
|
181
|
+
route={route}
|
|
182
|
+
progress={progress}
|
|
183
|
+
qrPayload={qrPayload}
|
|
184
|
+
theme={theme}
|
|
185
|
+
t={t}
|
|
186
|
+
/>
|
|
187
|
+
{status ? (
|
|
188
|
+
<Text
|
|
189
|
+
style={[styles.mutedText, { color: theme.colors.textSecondary }]}
|
|
190
|
+
accessibilityLiveRegion="polite"
|
|
191
|
+
testID="signin-progress"
|
|
192
|
+
>
|
|
193
|
+
{status}
|
|
194
|
+
</Text>
|
|
195
|
+
) : null}
|
|
196
|
+
{subordinateLinks}
|
|
197
|
+
<TroubleDisclosure actions={alternatives} revealed={routeFailed} theme={theme} t={t} />
|
|
198
|
+
</View>
|
|
199
|
+
);
|
|
200
|
+
};
|
|
201
|
+
|
|
202
|
+
export default OxySignInRequestSurface;
|
|
@@ -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';
|
|
@@ -20,10 +20,16 @@ import type React from 'react';
|
|
|
20
20
|
import { View } from 'react-native';
|
|
21
21
|
import { Button } from '@oxyhq/bloom/button';
|
|
22
22
|
import type { AccountDialogSnapshot } from '@oxyhq/core';
|
|
23
|
-
import TroubleDisclosure
|
|
23
|
+
import TroubleDisclosure from './TroubleDisclosure';
|
|
24
24
|
import { AccountRow, Dividerish, SubtleLink } from './primitives';
|
|
25
25
|
import { authChooserStyles as styles } from './styles';
|
|
26
|
-
import type {
|
|
26
|
+
import type {
|
|
27
|
+
OxyAuthChooserHandlers,
|
|
28
|
+
OxySignInSurfaceAction,
|
|
29
|
+
SignInAlternatives,
|
|
30
|
+
Theme,
|
|
31
|
+
Translate,
|
|
32
|
+
} from './types';
|
|
27
33
|
|
|
28
34
|
interface SignInEntryViewProps {
|
|
29
35
|
snapshot: AccountDialogSnapshot;
|
|
@@ -45,7 +51,7 @@ const SignInEntryView: React.FC<SignInEntryViewProps> = ({
|
|
|
45
51
|
}) => {
|
|
46
52
|
// The entry has no chosen route yet, so nothing here can have failed: the
|
|
47
53
|
// alternatives stay behind the disclosure unconditionally.
|
|
48
|
-
const troubleActions:
|
|
54
|
+
const troubleActions: OxySignInSurfaceAction[] = [
|
|
49
55
|
{
|
|
50
56
|
key: 'scan-qr-link',
|
|
51
57
|
label: t('accountSwitcher.scanQr'),
|