@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,313 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The JS half of the native background session credential.
|
|
3
|
-
*
|
|
4
|
-
* A home-screen widget or a sync job refreshes while the app process is dead:
|
|
5
|
-
* there is no JS runtime, so it cannot go through this SDK's normal session lane
|
|
6
|
-
* at all. Native code needs its own way to obtain a bearer, and this module is
|
|
7
|
-
* what gives it one — while the app runs, it provisions a purpose-built
|
|
8
|
-
* credential and hands it to the native store that `so.oxy.session.OxyBackgroundSession`
|
|
9
|
-
* reads.
|
|
10
|
-
*
|
|
11
|
-
* ## Why a separate credential rather than the device secret
|
|
12
|
-
*
|
|
13
|
-
* `POST /session/device/token` ROTATES the device secret on every mint, and the
|
|
14
|
-
* presented secret dies 60 seconds later. Native code minting with it would be a
|
|
15
|
-
* second writer to the value this SDK's whole session depends on — and since
|
|
16
|
-
* `createNativeAuthStateStore` serves JS from an in-process mirror that never
|
|
17
|
-
* re-reads storage, JS would be blind to that rotation. A worker killed between
|
|
18
|
-
* the server's rotation and its local write would sign the user out of the app.
|
|
19
|
-
* A credential that nobody rotates removes that failure mode instead of managing
|
|
20
|
-
* it.
|
|
21
|
-
*
|
|
22
|
-
* ## What this does NOT do
|
|
23
|
-
*
|
|
24
|
-
* It never reads or writes `oxy.auth.v1` / expo-secure-store. The two credentials
|
|
25
|
-
* live in different stores with one writer each, so there is nothing to keep in
|
|
26
|
-
* lockstep and no state that can disagree.
|
|
27
|
-
*
|
|
28
|
-
* ## Android only, and web is refused rather than merely unsupported
|
|
29
|
-
*
|
|
30
|
-
* Web is gated off by an explicit platform check, not by the native module being
|
|
31
|
-
* absent — provisioning in a browser origin would be a security downgrade, so it
|
|
32
|
-
* must not depend on an incidental fact. See {@link loadNativeModule}. iOS has no
|
|
33
|
-
* implementation yet and resolves to no module, so every function here degrades to
|
|
34
|
-
* a no-op: an app can enable this and lose nothing on other platforms.
|
|
35
|
-
*/
|
|
36
|
-
import { requireOptionalNativeModule } from 'expo-modules-core';
|
|
37
|
-
import { Platform } from 'react-native';
|
|
38
|
-
import type { OxyServices } from '@oxyhq/core';
|
|
39
|
-
import { logger } from '@oxyhq/core';
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* The native module's surface. Deliberately write-mostly: there is no `get`,
|
|
43
|
-
* because JS has no use for the secret it just wrote and keeping native as the
|
|
44
|
-
* secret's only reader is one less place it can leak from.
|
|
45
|
-
*/
|
|
46
|
-
interface OxyBackgroundSessionNativeModule {
|
|
47
|
-
/**
|
|
48
|
-
* Store (replacing) the credential. Resolves `false` when it was rejected or
|
|
49
|
-
* storage failed.
|
|
50
|
-
*
|
|
51
|
-
* Positional scalars rather than one object, matching the native signature — and
|
|
52
|
-
* that shape is load-bearing, not a preference. Passing an object made this an
|
|
53
|
-
* Expo Modules `Record`, and a `Record` does not convert in a consumer build of
|
|
54
|
-
* this package: every call was rejected with `The 1st argument cannot be cast to
|
|
55
|
-
* type CredentialInput (received class ReadableNativeMap)`, so the credential was
|
|
56
|
-
* never stored and background refreshes stayed signed out. See the comment on
|
|
57
|
-
* `AsyncFunction("put")` in `OxyBackgroundSessionModule.kt` for why, and do not
|
|
58
|
-
* restore the object form without proving on a device that a `Record` converts.
|
|
59
|
-
*
|
|
60
|
-
* `expiresAtMs` is epoch millis, parsed from the server's ISO-8601 string here
|
|
61
|
-
* rather than natively.
|
|
62
|
-
*/
|
|
63
|
-
put(
|
|
64
|
-
baseUrl: string,
|
|
65
|
-
deviceId: string,
|
|
66
|
-
secret: string,
|
|
67
|
-
accountId: string,
|
|
68
|
-
expiresAtMs: number,
|
|
69
|
-
): Promise<boolean>;
|
|
70
|
-
/** Drop the credential and any cached access token. */
|
|
71
|
-
clear(): Promise<boolean>;
|
|
72
|
-
/** What is stored: the owning account and its expiry (epoch millis), or `null`. */
|
|
73
|
-
peek(): Promise<{ accountId: string; expiresAt: number } | null>;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
/**
|
|
77
|
-
* Re-provision once the remaining lifetime drops below this.
|
|
78
|
-
*
|
|
79
|
-
* The server issues a 30-day credential; renewing with a week to spare means an
|
|
80
|
-
* app opened even occasionally always holds a live one, while an app left unopened
|
|
81
|
-
* for a month lets it lapse — which is the intended outcome, not a failure.
|
|
82
|
-
*/
|
|
83
|
-
const RENEW_WHEN_REMAINING_MS = 7 * 24 * 60 * 60 * 1000;
|
|
84
|
-
|
|
85
|
-
let nativeModule: OxyBackgroundSessionNativeModule | null | undefined;
|
|
86
|
-
|
|
87
|
-
/**
|
|
88
|
-
* Resolve the native module once — and refuse outright on web.
|
|
89
|
-
*
|
|
90
|
-
* ## Web is excluded on purpose, and not merely because the module is absent
|
|
91
|
-
*
|
|
92
|
-
* The credential is deliberately NON-ROTATING and long-lived, which is safe only
|
|
93
|
-
* because native background code is its sole consumer and nobody rotates it. A
|
|
94
|
-
* browser origin already holds the ROTATING `deviceSecret`, and it has no
|
|
95
|
-
* background worker to serve — so provisioning there would add a strictly weaker
|
|
96
|
-
* long-lived secret alongside a stronger short-lived one. That is a downgrade, not
|
|
97
|
-
* a harmless no-op, and the harm lands at the PROVISION CALL (which mints a live
|
|
98
|
-
* server-side credential) regardless of whether anything manages to store it.
|
|
99
|
-
*
|
|
100
|
-
* That property must not rest on `requireOptionalNativeModule` happening to return
|
|
101
|
-
* `null` on web. It does today — the module is registered for android only — but
|
|
102
|
-
* that is an incidental fact a future web shim or a web-build native-module mock
|
|
103
|
-
* would quietly reverse. So the platform is checked FIRST, before we even ask the
|
|
104
|
-
* registry, and every entry point in this module inherits the gate.
|
|
105
|
-
*
|
|
106
|
-
* (A pre-deploy server makes this visible too: oxy-api's `sessionDevice` router
|
|
107
|
-
* applies `requireSameSiteOrigin` path-agnostically, so an unmatched path answers
|
|
108
|
-
* `404` to a native caller but `403 BAD_ORIGIN` to a browser one. Core's degrade is
|
|
109
|
-
* deliberately narrow — `404 → null` only — because a real origin misconfiguration
|
|
110
|
-
* on a CURRENT server also returns 403, and swallowing that would hide a genuine
|
|
111
|
-
* bug. Platform gating belongs here, where the platform is actually known.)
|
|
112
|
-
*
|
|
113
|
-
* `requireOptionalNativeModule` (a static import Metro always resolves) rather
|
|
114
|
-
* than a dynamic `import(moduleName)`: the latter compiles to `require(variable)`
|
|
115
|
-
* in the CJS build, which Metro cannot resolve inside a consuming app — it
|
|
116
|
-
* silently returned `null` there, which is exactly how the cross-app SSO bridge
|
|
117
|
-
* broke once. Same reasoning as `loadSharedIdentityBridge` in `@oxyhq/protocol`.
|
|
118
|
-
*/
|
|
119
|
-
function loadNativeModule(): OxyBackgroundSessionNativeModule | null {
|
|
120
|
-
if (nativeModule === undefined) {
|
|
121
|
-
if (Platform.OS === 'web') {
|
|
122
|
-
nativeModule = null;
|
|
123
|
-
return nativeModule;
|
|
124
|
-
}
|
|
125
|
-
const native = requireOptionalNativeModule<Partial<OxyBackgroundSessionNativeModule>>(
|
|
126
|
-
'OxyBackgroundSession',
|
|
127
|
-
);
|
|
128
|
-
nativeModule =
|
|
129
|
-
native &&
|
|
130
|
-
typeof native.put === 'function' &&
|
|
131
|
-
typeof native.clear === 'function' &&
|
|
132
|
-
typeof native.peek === 'function'
|
|
133
|
-
? {
|
|
134
|
-
put: native.put.bind(native),
|
|
135
|
-
clear: native.clear.bind(native),
|
|
136
|
-
peek: native.peek.bind(native),
|
|
137
|
-
}
|
|
138
|
-
: null;
|
|
139
|
-
}
|
|
140
|
-
return nativeModule;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
/** Whether this platform/app can hold a background credential at all. */
|
|
144
|
-
export function isBackgroundSessionSupported(): boolean {
|
|
145
|
-
return loadNativeModule() !== null;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
/**
|
|
149
|
-
* Drop the stored credential. No-op where unsupported, and never throws.
|
|
150
|
-
*
|
|
151
|
-
* Called on sign-out and BEFORE an account switch's network work, so the window
|
|
152
|
-
* in which background code could still serve the previous account is as short as
|
|
153
|
-
* one local write.
|
|
154
|
-
*/
|
|
155
|
-
export async function clearBackgroundSession(): Promise<void> {
|
|
156
|
-
const native = loadNativeModule();
|
|
157
|
-
if (!native) {
|
|
158
|
-
return;
|
|
159
|
-
}
|
|
160
|
-
try {
|
|
161
|
-
await native.clear();
|
|
162
|
-
} catch (error) {
|
|
163
|
-
logger.warn('[backgroundSession] could not clear the native background credential', {
|
|
164
|
-
component: 'backgroundSession',
|
|
165
|
-
error,
|
|
166
|
-
});
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
export interface BackgroundSessionSyncInput {
|
|
171
|
-
oxyServices: OxyServices;
|
|
172
|
-
/** The signed-in account, or `null` when signed out. */
|
|
173
|
-
userId: string | null;
|
|
174
|
-
/** Whether a bearer is available yet — provisioning requires one. */
|
|
175
|
-
canUsePrivateApi: boolean;
|
|
176
|
-
/**
|
|
177
|
-
* Whether this run is still the current one. A run that loses its relevance
|
|
178
|
-
* mid-flight (unmount, or another identity change) must not write the
|
|
179
|
-
* credential it was about to write.
|
|
180
|
-
*/
|
|
181
|
-
isCurrent: () => boolean;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
/**
|
|
185
|
-
* Fail LOUDLY when the installed `@oxyhq/core` predates
|
|
186
|
-
* `provisionBackgroundCredential`.
|
|
187
|
-
*
|
|
188
|
-
* This is the one failure here that is a build/dependency mistake rather than a
|
|
189
|
-
* runtime condition, and it is the one that must never be quiet. Everything else
|
|
190
|
-
* in `syncBackgroundSession` is caught and logged at warn, which is right for a
|
|
191
|
-
* flaky network — but applying that to a version skew would leave background
|
|
192
|
-
* refreshes permanently non-functional behind a warning nobody reads. So this
|
|
193
|
-
* throws, and logs at ERROR first so it is still visible in a release build whose
|
|
194
|
-
* rejection handler is silent.
|
|
195
|
-
*
|
|
196
|
-
* Reachable only through a runtime skew: the declared `@oxyhq/core` range covers
|
|
197
|
-
* the method, so a correctly-resolved install cannot get here, and TypeScript
|
|
198
|
-
* rules it out at compile time.
|
|
199
|
-
*/
|
|
200
|
-
function assertProvisioningAvailable(oxyServices: OxyServices): void {
|
|
201
|
-
if (typeof oxyServices.provisionBackgroundCredential === 'function') {
|
|
202
|
-
return;
|
|
203
|
-
}
|
|
204
|
-
const message =
|
|
205
|
-
'[backgroundSession] the installed @oxyhq/core has no provisionBackgroundCredential, ' +
|
|
206
|
-
'so no background credential can be provisioned and native background refreshes will ' +
|
|
207
|
-
'never authenticate. Install a @oxyhq/core that satisfies this package\'s declared range.';
|
|
208
|
-
logger.error(message, undefined, { component: 'backgroundSession' });
|
|
209
|
-
throw new Error(message);
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
/**
|
|
213
|
-
* Bring the native credential in line with the session JS currently holds.
|
|
214
|
-
*
|
|
215
|
-
* Ordering is the load-bearing part: a credential belonging to a DIFFERENT
|
|
216
|
-
* account is cleared before any network call, so a crash mid-provision leaves
|
|
217
|
-
* background code signed out rather than serving the previous account's data
|
|
218
|
-
* under the new account's name. The server enforces the same rule independently
|
|
219
|
-
* (a mint is re-authorized against the live device session, and against its ACTIVE
|
|
220
|
-
* account), so this is the fast local half of a belt-and-braces pair, not the only
|
|
221
|
-
* guard.
|
|
222
|
-
*
|
|
223
|
-
* Throws for exactly one thing — a `@oxyhq/core` too old to provision (see
|
|
224
|
-
* {@link assertProvisioningAvailable}). Every other failure is caught and logged:
|
|
225
|
-
* a background credential is an enhancement, and failing to provision one must
|
|
226
|
-
* not disturb the session that is working.
|
|
227
|
-
*/
|
|
228
|
-
export async function syncBackgroundSession(input: BackgroundSessionSyncInput): Promise<void> {
|
|
229
|
-
const native = loadNativeModule();
|
|
230
|
-
if (!native) {
|
|
231
|
-
return;
|
|
232
|
-
}
|
|
233
|
-
const { oxyServices, userId, canUsePrivateApi, isCurrent } = input;
|
|
234
|
-
|
|
235
|
-
// Before the try, so the catch below cannot turn a dependency skew into a
|
|
236
|
-
// warning. Signed-out is exempt: clearing needs no core method, and a sign-out
|
|
237
|
-
// must never be blocked by one.
|
|
238
|
-
if (userId) {
|
|
239
|
-
assertProvisioningAvailable(oxyServices);
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
try {
|
|
243
|
-
if (!userId) {
|
|
244
|
-
// Signed out. Local-only, so it works with no bearer and no network.
|
|
245
|
-
await native.clear();
|
|
246
|
-
return;
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
const stored = await native.peek();
|
|
250
|
-
if (stored && stored.accountId !== userId) {
|
|
251
|
-
// Identity changed under a live credential — clear FIRST, provision after.
|
|
252
|
-
await native.clear();
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
const isForCurrentAccount = stored?.accountId === userId;
|
|
256
|
-
const hasLifeLeft =
|
|
257
|
-
isForCurrentAccount && stored.expiresAt - Date.now() > RENEW_WHEN_REMAINING_MS;
|
|
258
|
-
if (hasLifeLeft) {
|
|
259
|
-
return;
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
// Everything below needs a bearer. Without one yet (cold boot still
|
|
263
|
-
// resolving) there is nothing to do but wait for the next run — the token
|
|
264
|
-
// landing re-triggers this.
|
|
265
|
-
if (!canUsePrivateApi || !isCurrent()) {
|
|
266
|
-
return;
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
const provisioned = await oxyServices.provisionBackgroundCredential();
|
|
270
|
-
if (!provisioned) {
|
|
271
|
-
// `null` means the endpoint is not deployed yet. Expected during the
|
|
272
|
-
// rollout window (api leads the SDK) and deliberately quiet.
|
|
273
|
-
return;
|
|
274
|
-
}
|
|
275
|
-
if (!isCurrent()) {
|
|
276
|
-
return;
|
|
277
|
-
}
|
|
278
|
-
if (provisioned.accountId !== userId) {
|
|
279
|
-
// The active account moved while the request was in flight, so this
|
|
280
|
-
// credential is already for the wrong account. Drop it; the next run
|
|
281
|
-
// provisions for the account that is actually signed in.
|
|
282
|
-
await native.clear();
|
|
283
|
-
return;
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
const expiresAt = Date.parse(provisioned.expiresAt);
|
|
287
|
-
if (!Number.isFinite(expiresAt)) {
|
|
288
|
-
logger.warn('[backgroundSession] server returned an unparseable credential expiry', {
|
|
289
|
-
component: 'backgroundSession',
|
|
290
|
-
});
|
|
291
|
-
return;
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
const persisted = await native.put(
|
|
295
|
-
oxyServices.getBaseURL(),
|
|
296
|
-
provisioned.deviceId,
|
|
297
|
-
provisioned.secret,
|
|
298
|
-
provisioned.accountId,
|
|
299
|
-
expiresAt,
|
|
300
|
-
);
|
|
301
|
-
if (!persisted) {
|
|
302
|
-
logger.warn(
|
|
303
|
-
'[backgroundSession] the native store did not retain the background credential; background refreshes stay signed out until the next attempt',
|
|
304
|
-
{ component: 'backgroundSession' },
|
|
305
|
-
);
|
|
306
|
-
}
|
|
307
|
-
} catch (error) {
|
|
308
|
-
logger.warn('[backgroundSession] could not sync the native background credential', {
|
|
309
|
-
component: 'backgroundSession',
|
|
310
|
-
error,
|
|
311
|
-
});
|
|
312
|
-
}
|
|
313
|
-
}
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Keeps the native background credential in step with the session, so an app
|
|
3
|
-
* enables background authentication with one prop and writes no session code of
|
|
4
|
-
* its own.
|
|
5
|
-
*
|
|
6
|
-
* See `./backgroundSession` for what the credential is and why it is separate
|
|
7
|
-
* from the rotating device secret.
|
|
8
|
-
*/
|
|
9
|
-
import { useEffect } from 'react';
|
|
10
|
-
import { AppState } from 'react-native';
|
|
11
|
-
import type { OxyServices } from '@oxyhq/core';
|
|
12
|
-
import {
|
|
13
|
-
clearBackgroundSession,
|
|
14
|
-
isBackgroundSessionSupported,
|
|
15
|
-
syncBackgroundSession,
|
|
16
|
-
} from './backgroundSession';
|
|
17
|
-
|
|
18
|
-
export interface UseBackgroundSessionSyncInput {
|
|
19
|
-
/** `OxyProviderProps.backgroundSession`. */
|
|
20
|
-
enabled: boolean;
|
|
21
|
-
oxyServices: OxyServices;
|
|
22
|
-
/** The signed-in account, or `null` when signed out. */
|
|
23
|
-
userId: string | null;
|
|
24
|
-
/** Whether a bearer is available yet — provisioning needs one. */
|
|
25
|
-
canUsePrivateApi: boolean;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* An effect is the right shape here, unusually for this codebase: the work is a
|
|
30
|
-
* side effect on native storage, and it has to react both to an identity change
|
|
31
|
-
* (a value) and to the app being foregrounded (a subscription). There is no
|
|
32
|
-
* derived-state or React Query formulation of "write a credential to the
|
|
33
|
-
* keystore when the user changes or the app comes back".
|
|
34
|
-
*
|
|
35
|
-
* Re-runs on identity change, which is what makes sign-out and account switching
|
|
36
|
-
* work: `syncBackgroundSession` clears a credential belonging to anyone other
|
|
37
|
-
* than `userId` before it does any network work.
|
|
38
|
-
*/
|
|
39
|
-
export function useBackgroundSessionSync({
|
|
40
|
-
enabled,
|
|
41
|
-
oxyServices,
|
|
42
|
-
userId,
|
|
43
|
-
canUsePrivateApi,
|
|
44
|
-
}: UseBackgroundSessionSyncInput): void {
|
|
45
|
-
useEffect(() => {
|
|
46
|
-
if (!isBackgroundSessionSupported()) {
|
|
47
|
-
return;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
if (!enabled) {
|
|
51
|
-
// An app that leaves the feature off must not keep a credential THIS app
|
|
52
|
-
// provisioned earlier. The store is package-scoped (see
|
|
53
|
-
// OxyBackgroundSessionStore), so this cannot revoke a sibling Oxy app's
|
|
54
|
-
// credential under the shared UID.
|
|
55
|
-
void clearBackgroundSession();
|
|
56
|
-
return;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
// A run that is superseded (unmount, or another identity change) must not
|
|
60
|
-
// write the credential it was about to write.
|
|
61
|
-
let current = true;
|
|
62
|
-
// Deliberately NOT caught. `syncBackgroundSession` already handles every
|
|
63
|
-
// runtime failure internally and throws for exactly one thing: an installed
|
|
64
|
-
// `@oxyhq/core` too old to provision. That is a dependency mistake which must
|
|
65
|
-
// surface, so it is allowed to reject — adding a `.catch()` here would put it
|
|
66
|
-
// back behind the silence it was moved out of.
|
|
67
|
-
const run = () => {
|
|
68
|
-
void syncBackgroundSession({
|
|
69
|
-
oxyServices,
|
|
70
|
-
userId,
|
|
71
|
-
canUsePrivateApi,
|
|
72
|
-
isCurrent: () => current,
|
|
73
|
-
});
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
run();
|
|
77
|
-
const subscription = AppState.addEventListener('change', (state) => {
|
|
78
|
-
if (state === 'active') {
|
|
79
|
-
run();
|
|
80
|
-
}
|
|
81
|
-
});
|
|
82
|
-
|
|
83
|
-
return () => {
|
|
84
|
-
current = false;
|
|
85
|
-
subscription.remove();
|
|
86
|
-
// Deliberately NOT clearing here. Unmount is the app closing, which is
|
|
87
|
-
// precisely when the credential has to survive — clearing on teardown
|
|
88
|
-
// would defeat the entire feature. Revocation happens on sign-out (via a
|
|
89
|
-
// `userId` of null), on the server, or when the credential expires.
|
|
90
|
-
};
|
|
91
|
-
}, [enabled, oxyServices, userId, canUsePrivateApi]);
|
|
92
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
export interface NetInfoLikeState {
|
|
2
|
-
isConnected: boolean | null;
|
|
3
|
-
isInternetReachable?: boolean | null;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Mirrors Bloom `ConnectionStatusToasts` reachability semantics: a link that
|
|
8
|
-
* reports connected but explicitly unreachable (captive portal, no route) counts
|
|
9
|
-
* as offline.
|
|
10
|
-
*/
|
|
11
|
-
export function isNetConnectivityOnline(state: NetInfoLikeState): boolean {
|
|
12
|
-
return Boolean(state.isConnected && state.isInternetReachable !== false);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Conservative offline verdict for boot-path probes. Unknown / probing states
|
|
17
|
-
* (`null`, timed-out fetch) resolve to "not offline" so a flaky probe never
|
|
18
|
-
* skips a real sign-in.
|
|
19
|
-
*/
|
|
20
|
-
export function isNetConnectivityExplicitlyOffline(
|
|
21
|
-
state: NetInfoLikeState | null | undefined,
|
|
22
|
-
): boolean {
|
|
23
|
-
if (!state) return false;
|
|
24
|
-
if (state.isConnected === false) return true;
|
|
25
|
-
if (state.isConnected === true && state.isInternetReachable === false) return true;
|
|
26
|
-
return false;
|
|
27
|
-
}
|