@oxyhq/services 26.0.0 → 26.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/android/src/main/java/so/oxy/identity/OxyIdentityStore.kt +127 -21
- package/expo-module.config.json +1 -4
- package/lib/commonjs/index.js +49 -18
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/notifications/deviceNotifications.js +0 -63
- package/lib/commonjs/notifications/deviceNotifications.js.map +1 -1
- package/lib/commonjs/ui/boot/runProviderColdBoot.js +64 -20
- package/lib/commonjs/ui/boot/runProviderColdBoot.js.map +1 -1
- package/lib/commonjs/ui/components/FollowButton.js +4 -4
- package/lib/commonjs/ui/components/FollowButton.js.map +1 -1
- package/lib/commonjs/ui/components/OxyAccountDialogScreen.js +1 -13
- package/lib/commonjs/ui/components/OxyAccountDialogScreen.js.map +1 -1
- package/lib/commonjs/ui/components/OxyAuthChooser.js +8 -9
- package/lib/commonjs/ui/components/OxyAuthChooser.js.map +1 -1
- package/lib/commonjs/ui/components/OxyProvider.js +7 -8
- package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
- package/lib/commonjs/ui/components/OxySignInButton.js.map +1 -1
- package/lib/commonjs/ui/components/ProfileButton.js +1 -1
- package/lib/commonjs/ui/components/ProfileButton.js.map +1 -1
- package/lib/commonjs/ui/components/authChooser/AccountsMenuView.js +30 -25
- package/lib/commonjs/ui/components/authChooser/AccountsMenuView.js.map +1 -1
- package/lib/commonjs/ui/components/authChooser/primitives.js +9 -9
- package/lib/commonjs/ui/components/authChooser/primitives.js.map +1 -1
- package/lib/commonjs/ui/components/authChooser/useUsernameAvailability.js +2 -2
- package/lib/commonjs/ui/components/authChooser/useUsernameAvailability.js.map +1 -1
- package/lib/commonjs/ui/components/fileManagement/UploadPreview.js +2 -2
- package/lib/commonjs/ui/components/fileManagement/UploadPreview.js.map +1 -1
- package/lib/commonjs/ui/components/internal/PinInput.js +1 -3
- package/lib/commonjs/ui/components/internal/PinInput.js.map +1 -1
- package/lib/commonjs/ui/components/logo/LogoText.js +4 -4
- package/lib/commonjs/ui/components/logo/LogoText.js.map +1 -1
- package/lib/commonjs/ui/components/payment/PaymentDetailsStep.js +2 -2
- package/lib/commonjs/ui/components/payment/PaymentDetailsStep.js.map +1 -1
- package/lib/commonjs/ui/components/payment/PaymentSummaryStep.js +2 -2
- package/lib/commonjs/ui/components/payment/PaymentSummaryStep.js.map +1 -1
- package/lib/commonjs/ui/components/styles/shadow.js.map +1 -1
- package/lib/commonjs/ui/context/OxyContext.js +46 -32
- package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
- package/lib/commonjs/ui/context/commitSessionFlow.js +43 -3
- package/lib/commonjs/ui/context/commitSessionFlow.js.map +1 -1
- package/lib/commonjs/ui/context/hooks/useAuthOperations.js +2 -15
- package/lib/commonjs/ui/context/hooks/useAuthOperations.js.map +1 -1
- package/lib/commonjs/ui/context/useOxyAccountGraph.js +4 -3
- package/lib/commonjs/ui/context/useOxyAccountGraph.js.map +1 -1
- package/lib/commonjs/ui/hooks/mutations/mutationFactory.js +5 -5
- package/lib/commonjs/ui/hooks/mutations/mutationFactory.js.map +1 -1
- package/lib/commonjs/ui/hooks/mutations/useAccountMutations.js +11 -11
- package/lib/commonjs/ui/hooks/mutations/useAccountMutations.js.map +1 -1
- package/lib/commonjs/ui/hooks/mutations/useServicesMutations.js +9 -9
- package/lib/commonjs/ui/hooks/mutations/useServicesMutations.js.map +1 -1
- package/lib/commonjs/ui/hooks/queries/usePaymentQueries.js +2 -3
- package/lib/commonjs/ui/hooks/queries/usePaymentQueries.js.map +1 -1
- package/lib/commonjs/ui/hooks/queries/userCache.js +17 -17
- package/lib/commonjs/ui/hooks/queries/userCache.js.map +1 -1
- package/lib/commonjs/ui/hooks/useAssets.js.map +1 -1
- package/lib/commonjs/ui/hooks/useAsyncAction.js +7 -7
- package/lib/commonjs/ui/hooks/useAsyncAction.js.map +1 -1
- package/lib/commonjs/ui/hooks/useAuth.js +2 -4
- package/lib/commonjs/ui/hooks/useAuth.js.map +1 -1
- package/lib/commonjs/ui/hooks/useAvatarPicker.js +5 -5
- package/lib/commonjs/ui/hooks/useAvatarPicker.js.map +1 -1
- package/lib/commonjs/ui/hooks/useOnlineStatus.js +2 -3
- package/lib/commonjs/ui/hooks/useOnlineStatus.js.map +1 -1
- package/lib/commonjs/ui/hooks/useSessionManagement.js +2 -0
- package/lib/commonjs/ui/hooks/useSessionManagement.js.map +1 -1
- package/lib/commonjs/ui/hooks/useSettingToggle.js +4 -4
- package/lib/commonjs/ui/hooks/useSettingToggle.js.map +1 -1
- package/lib/commonjs/ui/hooks/useSurfaceHeader.js +11 -68
- package/lib/commonjs/ui/hooks/useSurfaceHeader.js.map +1 -1
- package/lib/commonjs/ui/oauth/browserAuthTransport.js +64 -66
- package/lib/commonjs/ui/oauth/browserAuthTransport.js.map +1 -1
- package/lib/commonjs/ui/oauth/legacyRedirectLanes.js +48 -0
- package/lib/commonjs/ui/oauth/legacyRedirectLanes.js.map +1 -0
- package/lib/commonjs/ui/oauth/oauthPopup.js +0 -47
- package/lib/commonjs/ui/oauth/oauthPopup.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountMembersScreen.js +10 -10
- package/lib/commonjs/ui/screens/AccountMembersScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js +19 -41
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountVerificationScreen.js +4 -4
- package/lib/commonjs/ui/screens/AccountVerificationScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AppInfoScreen.js +9 -9
- package/lib/commonjs/ui/screens/AppInfoScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AvatarCropScreen.js +3 -3
- package/lib/commonjs/ui/screens/AvatarCropScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ChangeAvatarScreen.js +7 -6
- package/lib/commonjs/ui/screens/ChangeAvatarScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ConnectedAppsScreen.js +4 -4
- package/lib/commonjs/ui/screens/ConnectedAppsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/CreateAccountScreen.js +13 -35
- package/lib/commonjs/ui/screens/CreateAccountScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/EditProfileFieldScreen.js +5 -5
- package/lib/commonjs/ui/screens/EditProfileFieldScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/EditProfileScreen.js +3 -2
- package/lib/commonjs/ui/screens/EditProfileScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FAQScreen.js +2 -2
- package/lib/commonjs/ui/screens/FAQScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FeedbackScreen.js +89 -90
- package/lib/commonjs/ui/screens/FeedbackScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FileManagementScreen.js +20 -20
- package/lib/commonjs/ui/screens/FileManagementScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FollowersListScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FollowingListScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/HelpSupportScreen.js +7 -7
- package/lib/commonjs/ui/screens/HelpSupportScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/HistoryViewScreen.js +34 -9
- package/lib/commonjs/ui/screens/HistoryViewScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/LanguageSelectorScreen.js +3 -3
- package/lib/commonjs/ui/screens/LanguageSelectorScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/LegalDocumentsScreen.js +3 -3
- package/lib/commonjs/ui/screens/LegalDocumentsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ManageAccountScreen.js +15 -15
- package/lib/commonjs/ui/screens/ManageAccountScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js +19 -19
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PrivacySettingsScreen.js +15 -15
- package/lib/commonjs/ui/screens/PrivacySettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ProfileScreen.js +7 -17
- package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SavesCollectionsScreen.js +2 -2
- package/lib/commonjs/ui/screens/SavesCollectionsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/UserListScreen.js +7 -13
- package/lib/commonjs/ui/screens/UserListScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js +6 -5
- package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/fileManagement/PhotoPickerSection.js +4 -1
- package/lib/commonjs/ui/screens/fileManagement/PhotoPickerSection.js.map +1 -1
- package/lib/commonjs/ui/screens/fileManagement/hooks/useFileUploadState.js +24 -34
- package/lib/commonjs/ui/screens/fileManagement/hooks/useFileUploadState.js.map +1 -1
- package/lib/commonjs/ui/screens/trust/TrustCenterScreen.js +1 -1
- package/lib/commonjs/ui/screens/trust/TrustCenterScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/trust/TrustLeaderboardScreen.js +4 -3
- package/lib/commonjs/ui/screens/trust/TrustLeaderboardScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/trust/TrustRewardsScreen.js +1 -1
- package/lib/commonjs/ui/screens/trust/TrustRewardsScreen.js.map +1 -1
- package/lib/commonjs/ui/session/index.js +0 -7
- package/lib/commonjs/ui/session/index.js.map +1 -1
- package/lib/commonjs/ui/utils/crossOriginRestore.js +140 -0
- package/lib/commonjs/ui/utils/crossOriginRestore.js.map +1 -0
- package/lib/commonjs/ui/utils/fileManagement.js +24 -24
- package/lib/commonjs/ui/utils/fileManagement.js.map +1 -1
- package/lib/commonjs/ui/utils/oauthReturn.js +30 -19
- package/lib/commonjs/ui/utils/oauthReturn.js.map +1 -1
- package/lib/commonjs/ui/utils/userUtils.js +28 -27
- package/lib/commonjs/ui/utils/userUtils.js.map +1 -1
- package/lib/module/index.js +8 -20
- package/lib/module/index.js.map +1 -1
- package/lib/module/notifications/deviceNotifications.js +0 -62
- package/lib/module/notifications/deviceNotifications.js.map +1 -1
- package/lib/module/ui/boot/runProviderColdBoot.js +65 -21
- package/lib/module/ui/boot/runProviderColdBoot.js.map +1 -1
- package/lib/module/ui/components/FollowButton.js +1 -1
- package/lib/module/ui/components/FollowButton.js.map +1 -1
- package/lib/module/ui/components/OxyAccountDialogScreen.js +1 -13
- package/lib/module/ui/components/OxyAccountDialogScreen.js.map +1 -1
- package/lib/module/ui/components/OxyAuthChooser.js +4 -5
- package/lib/module/ui/components/OxyAuthChooser.js.map +1 -1
- package/lib/module/ui/components/OxyProvider.js +6 -7
- package/lib/module/ui/components/OxyProvider.js.map +1 -1
- package/lib/module/ui/components/OxySignInButton.js.map +1 -1
- package/lib/module/ui/components/ProfileButton.js +2 -2
- package/lib/module/ui/components/ProfileButton.js.map +1 -1
- package/lib/module/ui/components/authChooser/AccountsMenuView.js +8 -3
- package/lib/module/ui/components/authChooser/AccountsMenuView.js.map +1 -1
- package/lib/module/ui/components/authChooser/primitives.js +1 -1
- package/lib/module/ui/components/authChooser/primitives.js.map +1 -1
- package/lib/module/ui/components/authChooser/useUsernameAvailability.js +1 -1
- package/lib/module/ui/components/authChooser/useUsernameAvailability.js.map +1 -1
- package/lib/module/ui/components/fileManagement/UploadPreview.js +1 -1
- package/lib/module/ui/components/fileManagement/UploadPreview.js.map +1 -1
- package/lib/module/ui/components/internal/PinInput.js +1 -3
- package/lib/module/ui/components/internal/PinInput.js.map +1 -1
- package/lib/module/ui/components/logo/LogoText.js +4 -4
- package/lib/module/ui/components/logo/LogoText.js.map +1 -1
- package/lib/module/ui/components/payment/PaymentDetailsStep.js +1 -1
- package/lib/module/ui/components/payment/PaymentDetailsStep.js.map +1 -1
- package/lib/module/ui/components/payment/PaymentSummaryStep.js +2 -2
- package/lib/module/ui/components/payment/PaymentSummaryStep.js.map +1 -1
- package/lib/module/ui/components/styles/shadow.js.map +1 -1
- package/lib/module/ui/context/OxyContext.js +49 -35
- package/lib/module/ui/context/OxyContext.js.map +1 -1
- package/lib/module/ui/context/commitSessionFlow.js +42 -3
- package/lib/module/ui/context/commitSessionFlow.js.map +1 -1
- package/lib/module/ui/context/hooks/useAuthOperations.js +2 -15
- package/lib/module/ui/context/hooks/useAuthOperations.js.map +1 -1
- package/lib/module/ui/context/useOxyAccountGraph.js +4 -3
- package/lib/module/ui/context/useOxyAccountGraph.js.map +1 -1
- package/lib/module/ui/hooks/mutations/mutationFactory.js +1 -1
- package/lib/module/ui/hooks/mutations/mutationFactory.js.map +1 -1
- package/lib/module/ui/hooks/mutations/useAccountMutations.js +1 -1
- package/lib/module/ui/hooks/mutations/useAccountMutations.js.map +1 -1
- package/lib/module/ui/hooks/mutations/useServicesMutations.js +1 -1
- package/lib/module/ui/hooks/mutations/useServicesMutations.js.map +1 -1
- package/lib/module/ui/hooks/queries/usePaymentQueries.js +2 -3
- package/lib/module/ui/hooks/queries/usePaymentQueries.js.map +1 -1
- package/lib/module/ui/hooks/queries/userCache.js +17 -17
- package/lib/module/ui/hooks/queries/userCache.js.map +1 -1
- package/lib/module/ui/hooks/useAssets.js.map +1 -1
- package/lib/module/ui/hooks/useAsyncAction.js +1 -1
- package/lib/module/ui/hooks/useAsyncAction.js.map +1 -1
- package/lib/module/ui/hooks/useAuth.js +2 -4
- package/lib/module/ui/hooks/useAuth.js.map +1 -1
- package/lib/module/ui/hooks/useAvatarPicker.js +1 -1
- package/lib/module/ui/hooks/useAvatarPicker.js.map +1 -1
- package/lib/module/ui/hooks/useOnlineStatus.js +2 -3
- package/lib/module/ui/hooks/useOnlineStatus.js.map +1 -1
- package/lib/module/ui/hooks/useSessionManagement.js +2 -0
- package/lib/module/ui/hooks/useSessionManagement.js.map +1 -1
- package/lib/module/ui/hooks/useSettingToggle.js +1 -1
- package/lib/module/ui/hooks/useSettingToggle.js.map +1 -1
- package/lib/module/ui/hooks/useSurfaceHeader.js +11 -68
- package/lib/module/ui/hooks/useSurfaceHeader.js.map +1 -1
- package/lib/module/ui/oauth/browserAuthTransport.js +64 -66
- package/lib/module/ui/oauth/browserAuthTransport.js.map +1 -1
- package/lib/module/ui/oauth/legacyRedirectLanes.js +44 -0
- package/lib/module/ui/oauth/legacyRedirectLanes.js.map +1 -0
- package/lib/module/ui/oauth/oauthPopup.js +1 -48
- package/lib/module/ui/oauth/oauthPopup.js.map +1 -1
- package/lib/module/ui/screens/AccountMembersScreen.js +1 -1
- package/lib/module/ui/screens/AccountMembersScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountSettingsScreen.js +15 -37
- package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountVerificationScreen.js +1 -1
- package/lib/module/ui/screens/AccountVerificationScreen.js.map +1 -1
- package/lib/module/ui/screens/AppInfoScreen.js +1 -1
- package/lib/module/ui/screens/AppInfoScreen.js.map +1 -1
- package/lib/module/ui/screens/AvatarCropScreen.js +1 -1
- package/lib/module/ui/screens/AvatarCropScreen.js.map +1 -1
- package/lib/module/ui/screens/ChangeAvatarScreen.js +5 -4
- package/lib/module/ui/screens/ChangeAvatarScreen.js.map +1 -1
- package/lib/module/ui/screens/ConnectedAppsScreen.js +2 -2
- package/lib/module/ui/screens/ConnectedAppsScreen.js.map +1 -1
- package/lib/module/ui/screens/CreateAccountScreen.js +12 -34
- package/lib/module/ui/screens/CreateAccountScreen.js.map +1 -1
- package/lib/module/ui/screens/EditProfileFieldScreen.js +4 -4
- package/lib/module/ui/screens/EditProfileFieldScreen.js.map +1 -1
- package/lib/module/ui/screens/EditProfileScreen.js +4 -3
- package/lib/module/ui/screens/EditProfileScreen.js.map +1 -1
- package/lib/module/ui/screens/FAQScreen.js +1 -1
- package/lib/module/ui/screens/FAQScreen.js.map +1 -1
- package/lib/module/ui/screens/FeedbackScreen.js +91 -94
- package/lib/module/ui/screens/FeedbackScreen.js.map +1 -1
- package/lib/module/ui/screens/FileManagementScreen.js +1 -1
- package/lib/module/ui/screens/FileManagementScreen.js.map +1 -1
- package/lib/module/ui/screens/FollowersListScreen.js.map +1 -1
- package/lib/module/ui/screens/FollowingListScreen.js.map +1 -1
- package/lib/module/ui/screens/HelpSupportScreen.js +1 -1
- package/lib/module/ui/screens/HelpSupportScreen.js.map +1 -1
- package/lib/module/ui/screens/HistoryViewScreen.js +30 -5
- package/lib/module/ui/screens/HistoryViewScreen.js.map +1 -1
- package/lib/module/ui/screens/LanguageSelectorScreen.js +1 -1
- package/lib/module/ui/screens/LanguageSelectorScreen.js.map +1 -1
- package/lib/module/ui/screens/LegalDocumentsScreen.js +1 -1
- package/lib/module/ui/screens/LegalDocumentsScreen.js.map +1 -1
- package/lib/module/ui/screens/ManageAccountScreen.js +3 -3
- package/lib/module/ui/screens/ManageAccountScreen.js.map +1 -1
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js +4 -4
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
- package/lib/module/ui/screens/PrivacySettingsScreen.js +11 -11
- package/lib/module/ui/screens/PrivacySettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/ProfileScreen.js +8 -18
- package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/module/ui/screens/SavesCollectionsScreen.js +1 -1
- package/lib/module/ui/screens/SavesCollectionsScreen.js.map +1 -1
- package/lib/module/ui/screens/UserListScreen.js +8 -14
- package/lib/module/ui/screens/UserListScreen.js.map +1 -1
- package/lib/module/ui/screens/WelcomeNewUserScreen.js +6 -5
- package/lib/module/ui/screens/WelcomeNewUserScreen.js.map +1 -1
- package/lib/module/ui/screens/fileManagement/PhotoPickerSection.js +4 -1
- package/lib/module/ui/screens/fileManagement/PhotoPickerSection.js.map +1 -1
- package/lib/module/ui/screens/fileManagement/hooks/useFileUploadState.js +5 -15
- package/lib/module/ui/screens/fileManagement/hooks/useFileUploadState.js.map +1 -1
- package/lib/module/ui/screens/trust/TrustCenterScreen.js +1 -1
- package/lib/module/ui/screens/trust/TrustCenterScreen.js.map +1 -1
- package/lib/module/ui/screens/trust/TrustLeaderboardScreen.js +5 -4
- package/lib/module/ui/screens/trust/TrustLeaderboardScreen.js.map +1 -1
- package/lib/module/ui/screens/trust/TrustRewardsScreen.js +1 -1
- package/lib/module/ui/screens/trust/TrustRewardsScreen.js.map +1 -1
- package/lib/module/ui/session/index.js +0 -1
- package/lib/module/ui/session/index.js.map +1 -1
- package/lib/module/ui/utils/crossOriginRestore.js +131 -0
- package/lib/module/ui/utils/crossOriginRestore.js.map +1 -0
- package/lib/module/ui/utils/fileManagement.js +25 -25
- package/lib/module/ui/utils/fileManagement.js.map +1 -1
- package/lib/module/ui/utils/oauthReturn.js +30 -20
- package/lib/module/ui/utils/oauthReturn.js.map +1 -1
- package/lib/module/ui/utils/userUtils.js +28 -27
- package/lib/module/ui/utils/userUtils.js.map +1 -1
- package/lib/typescript/commonjs/index.d.ts +2 -0
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/notifications/deviceNotifications.d.ts +0 -51
- package/lib/typescript/commonjs/notifications/deviceNotifications.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/boot/runProviderColdBoot.d.ts +30 -11
- package/lib/typescript/commonjs/ui/boot/runProviderColdBoot.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/OxyAccountDialogScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/OxyAuthChooser.d.ts +0 -7
- package/lib/typescript/commonjs/ui/components/OxyAuthChooser.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/OxySignInButton.d.ts +1 -2
- package/lib/typescript/commonjs/ui/components/OxySignInButton.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/ProfileButton.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/authChooser/AccountsMenuView.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/authChooser/primitives.d.ts +1 -1
- package/lib/typescript/commonjs/ui/components/authChooser/primitives.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/fileManagement/UploadPreview.d.ts +1 -1
- package/lib/typescript/commonjs/ui/components/fileManagement/UploadPreview.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/internal/PinInput.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/payment/types.d.ts +6 -6
- package/lib/typescript/commonjs/ui/components/payment/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/commitSessionFlow.d.ts +40 -0
- package/lib/typescript/commonjs/ui/context/commitSessionFlow.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/hooks/useAuthOperations.d.ts +2 -11
- package/lib/typescript/commonjs/ui/context/hooks/useAuthOperations.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/oxyContextTypes.d.ts +7 -26
- package/lib/typescript/commonjs/ui/context/oxyContextTypes.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/useOxyAccountGraph.d.ts +1 -0
- package/lib/typescript/commonjs/ui/context/useOxyAccountGraph.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/queries/paymentTypes.d.ts +2 -3
- package/lib/typescript/commonjs/ui/hooks/queries/paymentTypes.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/queries/usePaymentQueries.d.ts +2 -3
- package/lib/typescript/commonjs/ui/hooks/queries/usePaymentQueries.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/queries/userCache.d.ts +2 -2
- package/lib/typescript/commonjs/ui/hooks/queries/userCache.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useAssets.d.ts +1 -1
- package/lib/typescript/commonjs/ui/hooks/useAssets.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useAsyncAction.d.ts +2 -2
- package/lib/typescript/commonjs/ui/hooks/useAsyncAction.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useAuth.d.ts +2 -4
- package/lib/typescript/commonjs/ui/hooks/useAuth.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useOnlineStatus.d.ts +2 -3
- package/lib/typescript/commonjs/ui/hooks/useOnlineStatus.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useSessionManagement.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useSurfaceHeader.d.ts +2 -7
- package/lib/typescript/commonjs/ui/hooks/useSurfaceHeader.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/oauth/browserAuthTransport.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/oauth/legacyRedirectLanes.d.ts +40 -0
- package/lib/typescript/commonjs/ui/oauth/legacyRedirectLanes.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/oauth/oauthPopup.d.ts +0 -6
- package/lib/typescript/commonjs/ui/oauth/oauthPopup.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/ChangeAvatarScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/CreateAccountScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/EditProfileScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/FeedbackScreen.d.ts +2 -2
- package/lib/typescript/commonjs/ui/screens/FeedbackScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/FollowersListScreen.d.ts +0 -3
- package/lib/typescript/commonjs/ui/screens/FollowersListScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/FollowingListScreen.d.ts +0 -3
- package/lib/typescript/commonjs/ui/screens/FollowingListScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/HistoryViewScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/ManageAccountScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/ProfileScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/UserListScreen.d.ts +0 -7
- package/lib/typescript/commonjs/ui/screens/UserListScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/WelcomeNewUserScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/fileManagement/hooks/useFileUploadState.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/trust/TrustLeaderboardScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/trust/trustTier.d.ts +1 -1
- package/lib/typescript/commonjs/ui/screens/trust/trustTier.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/session/index.d.ts +0 -1
- package/lib/typescript/commonjs/ui/session/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/types/navigation.d.ts +19 -27
- package/lib/typescript/commonjs/ui/types/navigation.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/utils/crossOriginRestore.d.ts +43 -0
- package/lib/typescript/commonjs/ui/utils/crossOriginRestore.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/utils/fileManagement.d.ts +5 -5
- package/lib/typescript/commonjs/ui/utils/fileManagement.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/utils/oauthReturn.d.ts +12 -15
- package/lib/typescript/commonjs/ui/utils/oauthReturn.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/utils/userUtils.d.ts +14 -7
- package/lib/typescript/commonjs/ui/utils/userUtils.d.ts.map +1 -1
- package/lib/typescript/module/index.d.ts +2 -0
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/lib/typescript/module/notifications/deviceNotifications.d.ts +0 -51
- package/lib/typescript/module/notifications/deviceNotifications.d.ts.map +1 -1
- package/lib/typescript/module/ui/boot/runProviderColdBoot.d.ts +30 -11
- package/lib/typescript/module/ui/boot/runProviderColdBoot.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/OxyAccountDialogScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/OxyAuthChooser.d.ts +0 -7
- package/lib/typescript/module/ui/components/OxyAuthChooser.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/OxySignInButton.d.ts +1 -2
- package/lib/typescript/module/ui/components/OxySignInButton.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/ProfileButton.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/authChooser/AccountsMenuView.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/authChooser/primitives.d.ts +1 -1
- package/lib/typescript/module/ui/components/authChooser/primitives.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/fileManagement/UploadPreview.d.ts +1 -1
- package/lib/typescript/module/ui/components/fileManagement/UploadPreview.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/internal/PinInput.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/payment/types.d.ts +6 -6
- package/lib/typescript/module/ui/components/payment/types.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/commitSessionFlow.d.ts +40 -0
- package/lib/typescript/module/ui/context/commitSessionFlow.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/hooks/useAuthOperations.d.ts +2 -11
- package/lib/typescript/module/ui/context/hooks/useAuthOperations.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/oxyContextTypes.d.ts +7 -26
- package/lib/typescript/module/ui/context/oxyContextTypes.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/useOxyAccountGraph.d.ts +1 -0
- package/lib/typescript/module/ui/context/useOxyAccountGraph.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/queries/paymentTypes.d.ts +2 -3
- package/lib/typescript/module/ui/hooks/queries/paymentTypes.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/queries/usePaymentQueries.d.ts +2 -3
- package/lib/typescript/module/ui/hooks/queries/usePaymentQueries.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/queries/userCache.d.ts +2 -2
- package/lib/typescript/module/ui/hooks/queries/userCache.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useAssets.d.ts +1 -1
- package/lib/typescript/module/ui/hooks/useAssets.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useAsyncAction.d.ts +2 -2
- package/lib/typescript/module/ui/hooks/useAsyncAction.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useAuth.d.ts +2 -4
- package/lib/typescript/module/ui/hooks/useAuth.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useOnlineStatus.d.ts +2 -3
- package/lib/typescript/module/ui/hooks/useOnlineStatus.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useSessionManagement.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useSurfaceHeader.d.ts +2 -7
- package/lib/typescript/module/ui/hooks/useSurfaceHeader.d.ts.map +1 -1
- package/lib/typescript/module/ui/oauth/browserAuthTransport.d.ts.map +1 -1
- package/lib/typescript/module/ui/oauth/legacyRedirectLanes.d.ts +40 -0
- package/lib/typescript/module/ui/oauth/legacyRedirectLanes.d.ts.map +1 -0
- package/lib/typescript/module/ui/oauth/oauthPopup.d.ts +0 -6
- package/lib/typescript/module/ui/oauth/oauthPopup.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/ChangeAvatarScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/CreateAccountScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/EditProfileScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/FeedbackScreen.d.ts +2 -2
- package/lib/typescript/module/ui/screens/FeedbackScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/FollowersListScreen.d.ts +0 -3
- package/lib/typescript/module/ui/screens/FollowersListScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/FollowingListScreen.d.ts +0 -3
- package/lib/typescript/module/ui/screens/FollowingListScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/HistoryViewScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/ManageAccountScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/ProfileScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/UserListScreen.d.ts +0 -7
- package/lib/typescript/module/ui/screens/UserListScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/WelcomeNewUserScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/fileManagement/hooks/useFileUploadState.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/trust/TrustLeaderboardScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/trust/trustTier.d.ts +1 -1
- package/lib/typescript/module/ui/screens/trust/trustTier.d.ts.map +1 -1
- package/lib/typescript/module/ui/session/index.d.ts +0 -1
- package/lib/typescript/module/ui/session/index.d.ts.map +1 -1
- package/lib/typescript/module/ui/types/navigation.d.ts +19 -27
- package/lib/typescript/module/ui/types/navigation.d.ts.map +1 -1
- package/lib/typescript/module/ui/utils/crossOriginRestore.d.ts +43 -0
- package/lib/typescript/module/ui/utils/crossOriginRestore.d.ts.map +1 -0
- package/lib/typescript/module/ui/utils/fileManagement.d.ts +5 -5
- package/lib/typescript/module/ui/utils/fileManagement.d.ts.map +1 -1
- package/lib/typescript/module/ui/utils/oauthReturn.d.ts +12 -15
- package/lib/typescript/module/ui/utils/oauthReturn.d.ts.map +1 -1
- package/lib/typescript/module/ui/utils/userUtils.d.ts +14 -7
- package/lib/typescript/module/ui/utils/userUtils.d.ts.map +1 -1
- package/package.json +10 -22
- package/src/index.ts +16 -18
- package/src/notifications/deviceNotifications.ts +0 -82
- package/src/ui/boot/__tests__/coldBootWebAuthMode.test.ts +281 -0
- package/src/ui/boot/runProviderColdBoot.ts +101 -24
- package/src/ui/components/FollowButton.tsx +1 -1
- package/src/ui/components/OxyAccountDialogScreen.tsx +1 -13
- package/src/ui/components/OxyAuthChooser.tsx +4 -14
- package/src/ui/components/OxyProvider.tsx +7 -8
- package/src/ui/components/OxySignInButton.tsx +1 -2
- package/src/ui/components/ProfileButton.tsx +2 -5
- package/src/ui/components/authChooser/AccountsMenuView.tsx +10 -5
- package/src/ui/components/authChooser/primitives.tsx +1 -1
- package/src/ui/components/authChooser/useUsernameAvailability.ts +1 -1
- package/src/ui/components/fileManagement/UploadPreview.tsx +1 -1
- package/src/ui/components/internal/PinInput.tsx +0 -1
- package/src/ui/components/logo/LogoText.tsx +4 -4
- package/src/ui/components/payment/PaymentDetailsStep.tsx +1 -1
- package/src/ui/components/payment/PaymentSummaryStep.tsx +2 -2
- package/src/ui/components/payment/types.ts +24 -24
- package/src/ui/components/styles/shadow.tsx +2 -2
- package/src/ui/context/OxyContext.tsx +46 -35
- package/src/ui/context/__tests__/commitSessionFlow.test.ts +89 -13
- package/src/ui/context/commitSessionFlow.ts +61 -3
- package/src/ui/context/hooks/useAuthOperations.ts +1 -26
- package/src/ui/context/oxyContextTypes.ts +7 -26
- package/src/ui/context/useOxyAccountGraph.ts +4 -4
- package/src/ui/hooks/mutations/mutationFactory.ts +1 -1
- package/src/ui/hooks/mutations/useAccountMutations.ts +1 -1
- package/src/ui/hooks/mutations/useServicesMutations.ts +1 -1
- package/src/ui/hooks/queries/paymentTypes.ts +2 -3
- package/src/ui/hooks/queries/usePaymentQueries.ts +2 -3
- package/src/ui/hooks/queries/userCache.ts +148 -169
- package/src/ui/hooks/useAssets.ts +1 -1
- package/src/ui/hooks/useAsyncAction.ts +3 -3
- package/src/ui/hooks/useAuth.ts +2 -4
- package/src/ui/hooks/useAvatarPicker.ts +1 -1
- package/src/ui/hooks/useOnlineStatus.ts +2 -3
- package/src/ui/hooks/useSessionManagement.ts +2 -0
- package/src/ui/hooks/useSettingToggle.ts +1 -1
- package/src/ui/hooks/useSurfaceHeader.ts +15 -90
- package/src/ui/oauth/__tests__/oauthPopup.test.ts +0 -26
- package/src/ui/oauth/browserAuthTransport.ts +49 -55
- package/src/ui/oauth/legacyRedirectLanes.ts +43 -0
- package/src/ui/oauth/oauthPopup.ts +3 -61
- package/src/ui/screens/AccountMembersScreen.tsx +1 -1
- package/src/ui/screens/AccountSettingsScreen.tsx +17 -45
- package/src/ui/screens/AccountVerificationScreen.tsx +1 -1
- package/src/ui/screens/AppInfoScreen.tsx +1 -1
- package/src/ui/screens/AvatarCropScreen.tsx +1 -1
- package/src/ui/screens/ChangeAvatarScreen.tsx +4 -7
- package/src/ui/screens/ConnectedAppsScreen.tsx +2 -2
- package/src/ui/screens/CreateAccountScreen.tsx +13 -43
- package/src/ui/screens/EditProfileFieldScreen.tsx +4 -4
- package/src/ui/screens/EditProfileScreen.tsx +3 -6
- package/src/ui/screens/FAQScreen.tsx +1 -1
- package/src/ui/screens/FeedbackScreen.tsx +575 -741
- package/src/ui/screens/FileManagementScreen.tsx +1 -1
- package/src/ui/screens/FollowersListScreen.tsx +0 -3
- package/src/ui/screens/FollowingListScreen.tsx +0 -3
- package/src/ui/screens/HelpSupportScreen.tsx +1 -1
- package/src/ui/screens/HistoryViewScreen.tsx +20 -5
- package/src/ui/screens/LanguageSelectorScreen.tsx +1 -1
- package/src/ui/screens/LegalDocumentsScreen.tsx +1 -1
- package/src/ui/screens/ManageAccountScreen.tsx +2 -9
- package/src/ui/screens/PremiumSubscriptionScreen.tsx +4 -4
- package/src/ui/screens/PrivacySettingsScreen.tsx +12 -15
- package/src/ui/screens/ProfileScreen.tsx +6 -24
- package/src/ui/screens/SavesCollectionsScreen.tsx +1 -1
- package/src/ui/screens/UserListScreen.tsx +8 -18
- package/src/ui/screens/WelcomeNewUserScreen.tsx +6 -6
- package/src/ui/screens/fileManagement/PhotoPickerSection.tsx +1 -1
- package/src/ui/screens/fileManagement/hooks/useFileUploadState.ts +5 -14
- package/src/ui/screens/trust/TrustCenterScreen.tsx +2 -2
- package/src/ui/screens/trust/TrustLeaderboardScreen.tsx +5 -6
- package/src/ui/screens/trust/TrustRewardsScreen.tsx +1 -1
- package/src/ui/screens/trust/TrustRulesScreen.tsx +1 -1
- package/src/ui/screens/trust/trustTier.ts +1 -1
- package/src/ui/session/index.ts +0 -1
- package/src/ui/types/navigation.ts +19 -27
- package/src/ui/utils/__tests__/crossOriginRestore.test.ts +143 -0
- package/src/ui/utils/crossOriginRestore.ts +169 -0
- package/src/ui/utils/fileManagement.ts +92 -108
- package/src/ui/utils/oauthReturn.ts +33 -23
- package/src/ui/utils/userUtils.ts +32 -27
- package/android/src/main/java/so/oxy/session/OxyBackgroundSession.kt +0 -184
- package/android/src/main/java/so/oxy/session/OxyBackgroundSessionApi.kt +0 -162
- package/android/src/main/java/so/oxy/session/OxyBackgroundSessionModule.kt +0 -116
- package/android/src/main/java/so/oxy/session/OxyBackgroundSessionStore.kt +0 -179
- package/android/src/main/java/so/oxy/session/OxyBackgroundToken.kt +0 -61
- package/android/src/main/java/so/oxy/storage/OxyEncryptedPrefs.kt +0 -241
- package/lib/commonjs/ui/session/backgroundSession.js +0 -258
- package/lib/commonjs/ui/session/backgroundSession.js.map +0 -1
- package/lib/commonjs/ui/session/useBackgroundSessionSync.js +0 -81
- package/lib/commonjs/ui/session/useBackgroundSessionSync.js.map +0 -1
- package/lib/commonjs/ui/utils/netConnectivity.js +0 -28
- package/lib/commonjs/ui/utils/netConnectivity.js.map +0 -1
- package/lib/module/ui/session/backgroundSession.js +0 -252
- package/lib/module/ui/session/backgroundSession.js.map +0 -1
- package/lib/module/ui/session/useBackgroundSessionSync.js +0 -76
- package/lib/module/ui/session/useBackgroundSessionSync.js.map +0 -1
- package/lib/module/ui/utils/netConnectivity.js +0 -23
- package/lib/module/ui/utils/netConnectivity.js.map +0 -1
- package/lib/typescript/commonjs/ui/session/backgroundSession.d.ts +0 -42
- package/lib/typescript/commonjs/ui/session/backgroundSession.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/session/useBackgroundSessionSync.d.ts +0 -23
- package/lib/typescript/commonjs/ui/session/useBackgroundSessionSync.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/utils/netConnectivity.d.ts +0 -17
- package/lib/typescript/commonjs/ui/utils/netConnectivity.d.ts.map +0 -1
- package/lib/typescript/module/ui/session/backgroundSession.d.ts +0 -42
- package/lib/typescript/module/ui/session/backgroundSession.d.ts.map +0 -1
- package/lib/typescript/module/ui/session/useBackgroundSessionSync.d.ts +0 -23
- package/lib/typescript/module/ui/session/useBackgroundSessionSync.d.ts.map +0 -1
- package/lib/typescript/module/ui/utils/netConnectivity.d.ts +0 -17
- package/lib/typescript/module/ui/utils/netConnectivity.d.ts.map +0 -1
- package/lib/typescript/types/expo-image-picker.d.ts +0 -35
- package/src/types/expo-image-picker.d.ts +0 -35
- package/src/ui/boot/__tests__/coldBootNoIdpRedirect.test.ts +0 -215
- package/src/ui/session/__tests__/backgroundSession.test.ts +0 -392
- package/src/ui/session/backgroundSession.ts +0 -313
- package/src/ui/session/useBackgroundSessionSync.ts +0 -92
- package/src/ui/utils/netConnectivity.ts +0 -27
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Keeps the native background credential in step with the session, so an app
|
|
5
|
-
* enables background authentication with one prop and writes no session code of
|
|
6
|
-
* its own.
|
|
7
|
-
*
|
|
8
|
-
* See `./backgroundSession` for what the credential is and why it is separate
|
|
9
|
-
* from the rotating device secret.
|
|
10
|
-
*/
|
|
11
|
-
import { useEffect } from 'react';
|
|
12
|
-
import { AppState } from 'react-native';
|
|
13
|
-
import { clearBackgroundSession, isBackgroundSessionSupported, syncBackgroundSession } from "./backgroundSession.js";
|
|
14
|
-
/**
|
|
15
|
-
* An effect is the right shape here, unusually for this codebase: the work is a
|
|
16
|
-
* side effect on native storage, and it has to react both to an identity change
|
|
17
|
-
* (a value) and to the app being foregrounded (a subscription). There is no
|
|
18
|
-
* derived-state or React Query formulation of "write a credential to the
|
|
19
|
-
* keystore when the user changes or the app comes back".
|
|
20
|
-
*
|
|
21
|
-
* Re-runs on identity change, which is what makes sign-out and account switching
|
|
22
|
-
* work: `syncBackgroundSession` clears a credential belonging to anyone other
|
|
23
|
-
* than `userId` before it does any network work.
|
|
24
|
-
*/
|
|
25
|
-
export function useBackgroundSessionSync({
|
|
26
|
-
enabled,
|
|
27
|
-
oxyServices,
|
|
28
|
-
userId,
|
|
29
|
-
canUsePrivateApi
|
|
30
|
-
}) {
|
|
31
|
-
useEffect(() => {
|
|
32
|
-
if (!isBackgroundSessionSupported()) {
|
|
33
|
-
return;
|
|
34
|
-
}
|
|
35
|
-
if (!enabled) {
|
|
36
|
-
// An app that leaves the feature off must not keep a credential THIS app
|
|
37
|
-
// provisioned earlier. The store is package-scoped (see
|
|
38
|
-
// OxyBackgroundSessionStore), so this cannot revoke a sibling Oxy app's
|
|
39
|
-
// credential under the shared UID.
|
|
40
|
-
void clearBackgroundSession();
|
|
41
|
-
return;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
// A run that is superseded (unmount, or another identity change) must not
|
|
45
|
-
// write the credential it was about to write.
|
|
46
|
-
let current = true;
|
|
47
|
-
// Deliberately NOT caught. `syncBackgroundSession` already handles every
|
|
48
|
-
// runtime failure internally and throws for exactly one thing: an installed
|
|
49
|
-
// `@oxyhq/core` too old to provision. That is a dependency mistake which must
|
|
50
|
-
// surface, so it is allowed to reject — adding a `.catch()` here would put it
|
|
51
|
-
// back behind the silence it was moved out of.
|
|
52
|
-
const run = () => {
|
|
53
|
-
void syncBackgroundSession({
|
|
54
|
-
oxyServices,
|
|
55
|
-
userId,
|
|
56
|
-
canUsePrivateApi,
|
|
57
|
-
isCurrent: () => current
|
|
58
|
-
});
|
|
59
|
-
};
|
|
60
|
-
run();
|
|
61
|
-
const subscription = AppState.addEventListener('change', state => {
|
|
62
|
-
if (state === 'active') {
|
|
63
|
-
run();
|
|
64
|
-
}
|
|
65
|
-
});
|
|
66
|
-
return () => {
|
|
67
|
-
current = false;
|
|
68
|
-
subscription.remove();
|
|
69
|
-
// Deliberately NOT clearing here. Unmount is the app closing, which is
|
|
70
|
-
// precisely when the credential has to survive — clearing on teardown
|
|
71
|
-
// would defeat the entire feature. Revocation happens on sign-out (via a
|
|
72
|
-
// `userId` of null), on the server, or when the credential expires.
|
|
73
|
-
};
|
|
74
|
-
}, [enabled, oxyServices, userId, canUsePrivateApi]);
|
|
75
|
-
}
|
|
76
|
-
//# sourceMappingURL=useBackgroundSessionSync.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["useEffect","AppState","clearBackgroundSession","isBackgroundSessionSupported","syncBackgroundSession","useBackgroundSessionSync","enabled","oxyServices","userId","canUsePrivateApi","current","run","isCurrent","subscription","addEventListener","state","remove"],"sourceRoot":"../../../../src","sources":["ui/session/useBackgroundSessionSync.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,OAAO;AACjC,SAASC,QAAQ,QAAQ,cAAc;AAEvC,SACEC,sBAAsB,EACtBC,4BAA4B,EAC5BC,qBAAqB,QAChB,wBAAqB;AAY5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,wBAAwBA,CAAC;EACvCC,OAAO;EACPC,WAAW;EACXC,MAAM;EACNC;AAC6B,CAAC,EAAQ;EACtCT,SAAS,CAAC,MAAM;IACd,IAAI,CAACG,4BAA4B,CAAC,CAAC,EAAE;MACnC;IACF;IAEA,IAAI,CAACG,OAAO,EAAE;MACZ;MACA;MACA;MACA;MACA,KAAKJ,sBAAsB,CAAC,CAAC;MAC7B;IACF;;IAEA;IACA;IACA,IAAIQ,OAAO,GAAG,IAAI;IAClB;IACA;IACA;IACA;IACA;IACA,MAAMC,GAAG,GAAGA,CAAA,KAAM;MAChB,KAAKP,qBAAqB,CAAC;QACzBG,WAAW;QACXC,MAAM;QACNC,gBAAgB;QAChBG,SAAS,EAAEA,CAAA,KAAMF;MACnB,CAAC,CAAC;IACJ,CAAC;IAEDC,GAAG,CAAC,CAAC;IACL,MAAME,YAAY,GAAGZ,QAAQ,CAACa,gBAAgB,CAAC,QAAQ,EAAGC,KAAK,IAAK;MAClE,IAAIA,KAAK,KAAK,QAAQ,EAAE;QACtBJ,GAAG,CAAC,CAAC;MACP;IACF,CAAC,CAAC;IAEF,OAAO,MAAM;MACXD,OAAO,GAAG,KAAK;MACfG,YAAY,CAACG,MAAM,CAAC,CAAC;MACrB;MACA;MACA;MACA;IACF,CAAC;EACH,CAAC,EAAE,CAACV,OAAO,EAAEC,WAAW,EAAEC,MAAM,EAAEC,gBAAgB,CAAC,CAAC;AACtD","ignoreList":[]}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Mirrors Bloom `ConnectionStatusToasts` reachability semantics: a link that
|
|
5
|
-
* reports connected but explicitly unreachable (captive portal, no route) counts
|
|
6
|
-
* as offline.
|
|
7
|
-
*/
|
|
8
|
-
export function isNetConnectivityOnline(state) {
|
|
9
|
-
return Boolean(state.isConnected && state.isInternetReachable !== false);
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Conservative offline verdict for boot-path probes. Unknown / probing states
|
|
14
|
-
* (`null`, timed-out fetch) resolve to "not offline" so a flaky probe never
|
|
15
|
-
* skips a real sign-in.
|
|
16
|
-
*/
|
|
17
|
-
export function isNetConnectivityExplicitlyOffline(state) {
|
|
18
|
-
if (!state) return false;
|
|
19
|
-
if (state.isConnected === false) return true;
|
|
20
|
-
if (state.isConnected === true && state.isInternetReachable === false) return true;
|
|
21
|
-
return false;
|
|
22
|
-
}
|
|
23
|
-
//# sourceMappingURL=netConnectivity.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["isNetConnectivityOnline","state","Boolean","isConnected","isInternetReachable","isNetConnectivityExplicitlyOffline"],"sourceRoot":"../../../../src","sources":["ui/utils/netConnectivity.ts"],"mappings":";;AAKA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,uBAAuBA,CAACC,KAAuB,EAAW;EACxE,OAAOC,OAAO,CAACD,KAAK,CAACE,WAAW,IAAIF,KAAK,CAACG,mBAAmB,KAAK,KAAK,CAAC;AAC1E;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,kCAAkCA,CAChDJ,KAA0C,EACjC;EACT,IAAI,CAACA,KAAK,EAAE,OAAO,KAAK;EACxB,IAAIA,KAAK,CAACE,WAAW,KAAK,KAAK,EAAE,OAAO,IAAI;EAC5C,IAAIF,KAAK,CAACE,WAAW,KAAK,IAAI,IAAIF,KAAK,CAACG,mBAAmB,KAAK,KAAK,EAAE,OAAO,IAAI;EAClF,OAAO,KAAK;AACd","ignoreList":[]}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import type { OxyServices } from '@oxyhq/core';
|
|
2
|
-
/** Whether this platform/app can hold a background credential at all. */
|
|
3
|
-
export declare function isBackgroundSessionSupported(): boolean;
|
|
4
|
-
/**
|
|
5
|
-
* Drop the stored credential. No-op where unsupported, and never throws.
|
|
6
|
-
*
|
|
7
|
-
* Called on sign-out and BEFORE an account switch's network work, so the window
|
|
8
|
-
* in which background code could still serve the previous account is as short as
|
|
9
|
-
* one local write.
|
|
10
|
-
*/
|
|
11
|
-
export declare function clearBackgroundSession(): Promise<void>;
|
|
12
|
-
export interface BackgroundSessionSyncInput {
|
|
13
|
-
oxyServices: OxyServices;
|
|
14
|
-
/** The signed-in account, or `null` when signed out. */
|
|
15
|
-
userId: string | null;
|
|
16
|
-
/** Whether a bearer is available yet — provisioning requires one. */
|
|
17
|
-
canUsePrivateApi: boolean;
|
|
18
|
-
/**
|
|
19
|
-
* Whether this run is still the current one. A run that loses its relevance
|
|
20
|
-
* mid-flight (unmount, or another identity change) must not write the
|
|
21
|
-
* credential it was about to write.
|
|
22
|
-
*/
|
|
23
|
-
isCurrent: () => boolean;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Bring the native credential in line with the session JS currently holds.
|
|
27
|
-
*
|
|
28
|
-
* Ordering is the load-bearing part: a credential belonging to a DIFFERENT
|
|
29
|
-
* account is cleared before any network call, so a crash mid-provision leaves
|
|
30
|
-
* background code signed out rather than serving the previous account's data
|
|
31
|
-
* under the new account's name. The server enforces the same rule independently
|
|
32
|
-
* (a mint is re-authorized against the live device session, and against its ACTIVE
|
|
33
|
-
* account), so this is the fast local half of a belt-and-braces pair, not the only
|
|
34
|
-
* guard.
|
|
35
|
-
*
|
|
36
|
-
* Throws for exactly one thing — a `@oxyhq/core` too old to provision (see
|
|
37
|
-
* {@link assertProvisioningAvailable}). Every other failure is caught and logged:
|
|
38
|
-
* a background credential is an enhancement, and failing to provision one must
|
|
39
|
-
* not disturb the session that is working.
|
|
40
|
-
*/
|
|
41
|
-
export declare function syncBackgroundSession(input: BackgroundSessionSyncInput): Promise<void>;
|
|
42
|
-
//# sourceMappingURL=backgroundSession.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"backgroundSession.d.ts","sourceRoot":"","sources":["../../../../../src/ui/session/backgroundSession.ts"],"names":[],"mappings":"AAqCA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAyG/C,yEAAyE;AACzE,wBAAgB,4BAA4B,IAAI,OAAO,CAEtD;AAED;;;;;;GAMG;AACH,wBAAsB,sBAAsB,IAAI,OAAO,CAAC,IAAI,CAAC,CAa5D;AAED,MAAM,WAAW,0BAA0B;IACzC,WAAW,EAAE,WAAW,CAAC;IACzB,wDAAwD;IACxD,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,qEAAqE;IACrE,gBAAgB,EAAE,OAAO,CAAC;IAC1B;;;;OAIG;IACH,SAAS,EAAE,MAAM,OAAO,CAAC;CAC1B;AA8BD;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,qBAAqB,CAAC,KAAK,EAAE,0BAA0B,GAAG,OAAO,CAAC,IAAI,CAAC,CAqF5F"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import type { OxyServices } from '@oxyhq/core';
|
|
2
|
-
export interface UseBackgroundSessionSyncInput {
|
|
3
|
-
/** `OxyProviderProps.backgroundSession`. */
|
|
4
|
-
enabled: boolean;
|
|
5
|
-
oxyServices: OxyServices;
|
|
6
|
-
/** The signed-in account, or `null` when signed out. */
|
|
7
|
-
userId: string | null;
|
|
8
|
-
/** Whether a bearer is available yet — provisioning needs one. */
|
|
9
|
-
canUsePrivateApi: boolean;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* An effect is the right shape here, unusually for this codebase: the work is a
|
|
13
|
-
* side effect on native storage, and it has to react both to an identity change
|
|
14
|
-
* (a value) and to the app being foregrounded (a subscription). There is no
|
|
15
|
-
* derived-state or React Query formulation of "write a credential to the
|
|
16
|
-
* keystore when the user changes or the app comes back".
|
|
17
|
-
*
|
|
18
|
-
* Re-runs on identity change, which is what makes sign-out and account switching
|
|
19
|
-
* work: `syncBackgroundSession` clears a credential belonging to anyone other
|
|
20
|
-
* than `userId` before it does any network work.
|
|
21
|
-
*/
|
|
22
|
-
export declare function useBackgroundSessionSync({ enabled, oxyServices, userId, canUsePrivateApi, }: UseBackgroundSessionSyncInput): void;
|
|
23
|
-
//# sourceMappingURL=useBackgroundSessionSync.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useBackgroundSessionSync.d.ts","sourceRoot":"","sources":["../../../../../src/ui/session/useBackgroundSessionSync.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAO/C,MAAM,WAAW,6BAA6B;IAC5C,4CAA4C;IAC5C,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,EAAE,WAAW,CAAC;IACzB,wDAAwD;IACxD,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,kEAAkE;IAClE,gBAAgB,EAAE,OAAO,CAAC;CAC3B;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,wBAAwB,CAAC,EACvC,OAAO,EACP,WAAW,EACX,MAAM,EACN,gBAAgB,GACjB,EAAE,6BAA6B,GAAG,IAAI,CAgDtC"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export interface NetInfoLikeState {
|
|
2
|
-
isConnected: boolean | null;
|
|
3
|
-
isInternetReachable?: boolean | null;
|
|
4
|
-
}
|
|
5
|
-
/**
|
|
6
|
-
* Mirrors Bloom `ConnectionStatusToasts` reachability semantics: a link that
|
|
7
|
-
* reports connected but explicitly unreachable (captive portal, no route) counts
|
|
8
|
-
* as offline.
|
|
9
|
-
*/
|
|
10
|
-
export declare function isNetConnectivityOnline(state: NetInfoLikeState): boolean;
|
|
11
|
-
/**
|
|
12
|
-
* Conservative offline verdict for boot-path probes. Unknown / probing states
|
|
13
|
-
* (`null`, timed-out fetch) resolve to "not offline" so a flaky probe never
|
|
14
|
-
* skips a real sign-in.
|
|
15
|
-
*/
|
|
16
|
-
export declare function isNetConnectivityExplicitlyOffline(state: NetInfoLikeState | null | undefined): boolean;
|
|
17
|
-
//# sourceMappingURL=netConnectivity.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"netConnectivity.d.ts","sourceRoot":"","sources":["../../../../../src/ui/utils/netConnectivity.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,gBAAgB;IAC/B,WAAW,EAAE,OAAO,GAAG,IAAI,CAAC;IAC5B,mBAAmB,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;CACtC;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,gBAAgB,GAAG,OAAO,CAExE;AAED;;;;GAIG;AACH,wBAAgB,kCAAkC,CAChD,KAAK,EAAE,gBAAgB,GAAG,IAAI,GAAG,SAAS,GACzC,OAAO,CAKT"}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import type { OxyServices } from '@oxyhq/core';
|
|
2
|
-
/** Whether this platform/app can hold a background credential at all. */
|
|
3
|
-
export declare function isBackgroundSessionSupported(): boolean;
|
|
4
|
-
/**
|
|
5
|
-
* Drop the stored credential. No-op where unsupported, and never throws.
|
|
6
|
-
*
|
|
7
|
-
* Called on sign-out and BEFORE an account switch's network work, so the window
|
|
8
|
-
* in which background code could still serve the previous account is as short as
|
|
9
|
-
* one local write.
|
|
10
|
-
*/
|
|
11
|
-
export declare function clearBackgroundSession(): Promise<void>;
|
|
12
|
-
export interface BackgroundSessionSyncInput {
|
|
13
|
-
oxyServices: OxyServices;
|
|
14
|
-
/** The signed-in account, or `null` when signed out. */
|
|
15
|
-
userId: string | null;
|
|
16
|
-
/** Whether a bearer is available yet — provisioning requires one. */
|
|
17
|
-
canUsePrivateApi: boolean;
|
|
18
|
-
/**
|
|
19
|
-
* Whether this run is still the current one. A run that loses its relevance
|
|
20
|
-
* mid-flight (unmount, or another identity change) must not write the
|
|
21
|
-
* credential it was about to write.
|
|
22
|
-
*/
|
|
23
|
-
isCurrent: () => boolean;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Bring the native credential in line with the session JS currently holds.
|
|
27
|
-
*
|
|
28
|
-
* Ordering is the load-bearing part: a credential belonging to a DIFFERENT
|
|
29
|
-
* account is cleared before any network call, so a crash mid-provision leaves
|
|
30
|
-
* background code signed out rather than serving the previous account's data
|
|
31
|
-
* under the new account's name. The server enforces the same rule independently
|
|
32
|
-
* (a mint is re-authorized against the live device session, and against its ACTIVE
|
|
33
|
-
* account), so this is the fast local half of a belt-and-braces pair, not the only
|
|
34
|
-
* guard.
|
|
35
|
-
*
|
|
36
|
-
* Throws for exactly one thing — a `@oxyhq/core` too old to provision (see
|
|
37
|
-
* {@link assertProvisioningAvailable}). Every other failure is caught and logged:
|
|
38
|
-
* a background credential is an enhancement, and failing to provision one must
|
|
39
|
-
* not disturb the session that is working.
|
|
40
|
-
*/
|
|
41
|
-
export declare function syncBackgroundSession(input: BackgroundSessionSyncInput): Promise<void>;
|
|
42
|
-
//# sourceMappingURL=backgroundSession.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"backgroundSession.d.ts","sourceRoot":"","sources":["../../../../../src/ui/session/backgroundSession.ts"],"names":[],"mappings":"AAqCA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAyG/C,yEAAyE;AACzE,wBAAgB,4BAA4B,IAAI,OAAO,CAEtD;AAED;;;;;;GAMG;AACH,wBAAsB,sBAAsB,IAAI,OAAO,CAAC,IAAI,CAAC,CAa5D;AAED,MAAM,WAAW,0BAA0B;IACzC,WAAW,EAAE,WAAW,CAAC;IACzB,wDAAwD;IACxD,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,qEAAqE;IACrE,gBAAgB,EAAE,OAAO,CAAC;IAC1B;;;;OAIG;IACH,SAAS,EAAE,MAAM,OAAO,CAAC;CAC1B;AA8BD;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,qBAAqB,CAAC,KAAK,EAAE,0BAA0B,GAAG,OAAO,CAAC,IAAI,CAAC,CAqF5F"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import type { OxyServices } from '@oxyhq/core';
|
|
2
|
-
export interface UseBackgroundSessionSyncInput {
|
|
3
|
-
/** `OxyProviderProps.backgroundSession`. */
|
|
4
|
-
enabled: boolean;
|
|
5
|
-
oxyServices: OxyServices;
|
|
6
|
-
/** The signed-in account, or `null` when signed out. */
|
|
7
|
-
userId: string | null;
|
|
8
|
-
/** Whether a bearer is available yet — provisioning needs one. */
|
|
9
|
-
canUsePrivateApi: boolean;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* An effect is the right shape here, unusually for this codebase: the work is a
|
|
13
|
-
* side effect on native storage, and it has to react both to an identity change
|
|
14
|
-
* (a value) and to the app being foregrounded (a subscription). There is no
|
|
15
|
-
* derived-state or React Query formulation of "write a credential to the
|
|
16
|
-
* keystore when the user changes or the app comes back".
|
|
17
|
-
*
|
|
18
|
-
* Re-runs on identity change, which is what makes sign-out and account switching
|
|
19
|
-
* work: `syncBackgroundSession` clears a credential belonging to anyone other
|
|
20
|
-
* than `userId` before it does any network work.
|
|
21
|
-
*/
|
|
22
|
-
export declare function useBackgroundSessionSync({ enabled, oxyServices, userId, canUsePrivateApi, }: UseBackgroundSessionSyncInput): void;
|
|
23
|
-
//# sourceMappingURL=useBackgroundSessionSync.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useBackgroundSessionSync.d.ts","sourceRoot":"","sources":["../../../../../src/ui/session/useBackgroundSessionSync.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAO/C,MAAM,WAAW,6BAA6B;IAC5C,4CAA4C;IAC5C,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,EAAE,WAAW,CAAC;IACzB,wDAAwD;IACxD,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,kEAAkE;IAClE,gBAAgB,EAAE,OAAO,CAAC;CAC3B;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,wBAAwB,CAAC,EACvC,OAAO,EACP,WAAW,EACX,MAAM,EACN,gBAAgB,GACjB,EAAE,6BAA6B,GAAG,IAAI,CAgDtC"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export interface NetInfoLikeState {
|
|
2
|
-
isConnected: boolean | null;
|
|
3
|
-
isInternetReachable?: boolean | null;
|
|
4
|
-
}
|
|
5
|
-
/**
|
|
6
|
-
* Mirrors Bloom `ConnectionStatusToasts` reachability semantics: a link that
|
|
7
|
-
* reports connected but explicitly unreachable (captive portal, no route) counts
|
|
8
|
-
* as offline.
|
|
9
|
-
*/
|
|
10
|
-
export declare function isNetConnectivityOnline(state: NetInfoLikeState): boolean;
|
|
11
|
-
/**
|
|
12
|
-
* Conservative offline verdict for boot-path probes. Unknown / probing states
|
|
13
|
-
* (`null`, timed-out fetch) resolve to "not offline" so a flaky probe never
|
|
14
|
-
* skips a real sign-in.
|
|
15
|
-
*/
|
|
16
|
-
export declare function isNetConnectivityExplicitlyOffline(state: NetInfoLikeState | null | undefined): boolean;
|
|
17
|
-
//# sourceMappingURL=netConnectivity.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"netConnectivity.d.ts","sourceRoot":"","sources":["../../../../../src/ui/utils/netConnectivity.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,gBAAgB;IAC/B,WAAW,EAAE,OAAO,GAAG,IAAI,CAAC;IAC5B,mBAAmB,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;CACtC;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,gBAAgB,GAAG,OAAO,CAExE;AAED;;;;GAIG;AACH,wBAAgB,kCAAkC,CAChD,KAAK,EAAE,gBAAgB,GAAG,IAAI,GAAG,SAAS,GACzC,OAAO,CAKT"}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
declare module 'expo-image-picker' {
|
|
2
|
-
export interface ImagePickerAsset {
|
|
3
|
-
uri: string;
|
|
4
|
-
width: number;
|
|
5
|
-
height: number;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export interface ImagePickerSuccessResult {
|
|
9
|
-
canceled: false;
|
|
10
|
-
assets: ImagePickerAsset[];
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export interface ImagePickerCanceledResult {
|
|
14
|
-
canceled: true;
|
|
15
|
-
assets: null;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export type ImagePickerResult = ImagePickerSuccessResult | ImagePickerCanceledResult;
|
|
19
|
-
|
|
20
|
-
export interface ImagePickerPermission {
|
|
21
|
-
granted: boolean;
|
|
22
|
-
canAskAgain: boolean;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export interface ImagePickerOptions {
|
|
26
|
-
mediaTypes?: 'images'[];
|
|
27
|
-
allowsMultipleSelection?: boolean;
|
|
28
|
-
quality?: number;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export function launchImageLibraryAsync(options?: ImagePickerOptions): Promise<ImagePickerResult>;
|
|
32
|
-
export function launchCameraAsync(options?: ImagePickerOptions): Promise<ImagePickerResult>;
|
|
33
|
-
export function requestMediaLibraryPermissionsAsync(): Promise<ImagePickerPermission>;
|
|
34
|
-
export function requestCameraPermissionsAsync(): Promise<ImagePickerPermission>;
|
|
35
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
declare module 'expo-image-picker' {
|
|
2
|
-
export interface ImagePickerAsset {
|
|
3
|
-
uri: string;
|
|
4
|
-
width: number;
|
|
5
|
-
height: number;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export interface ImagePickerSuccessResult {
|
|
9
|
-
canceled: false;
|
|
10
|
-
assets: ImagePickerAsset[];
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export interface ImagePickerCanceledResult {
|
|
14
|
-
canceled: true;
|
|
15
|
-
assets: null;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export type ImagePickerResult = ImagePickerSuccessResult | ImagePickerCanceledResult;
|
|
19
|
-
|
|
20
|
-
export interface ImagePickerPermission {
|
|
21
|
-
granted: boolean;
|
|
22
|
-
canAskAgain: boolean;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export interface ImagePickerOptions {
|
|
26
|
-
mediaTypes?: 'images'[];
|
|
27
|
-
allowsMultipleSelection?: boolean;
|
|
28
|
-
quality?: number;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export function launchImageLibraryAsync(options?: ImagePickerOptions): Promise<ImagePickerResult>;
|
|
32
|
-
export function launchCameraAsync(options?: ImagePickerOptions): Promise<ImagePickerResult>;
|
|
33
|
-
export function requestMediaLibraryPermissionsAsync(): Promise<ImagePickerPermission>;
|
|
34
|
-
export function requestCameraPermissionsAsync(): Promise<ImagePickerPermission>;
|
|
35
|
-
}
|
|
@@ -1,215 +0,0 @@
|
|
|
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
|
-
});
|