@oxyhq/services 26.0.1 → 26.0.3
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 +21 -127
- package/android/src/main/java/so/oxy/session/OxyBackgroundSession.kt +184 -0
- package/android/src/main/java/so/oxy/session/OxyBackgroundSessionApi.kt +162 -0
- package/android/src/main/java/so/oxy/session/OxyBackgroundSessionModule.kt +116 -0
- package/android/src/main/java/so/oxy/session/OxyBackgroundSessionStore.kt +179 -0
- package/android/src/main/java/so/oxy/session/OxyBackgroundToken.kt +61 -0
- package/android/src/main/java/so/oxy/storage/OxyEncryptedPrefs.kt +241 -0
- package/expo-module.config.json +4 -1
- package/lib/commonjs/index.js +18 -49
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/notifications/deviceNotifications.js +63 -0
- package/lib/commonjs/notifications/deviceNotifications.js.map +1 -1
- package/lib/commonjs/ui/boot/runProviderColdBoot.js +20 -64
- package/lib/commonjs/ui/boot/runProviderColdBoot.js.map +1 -1
- package/lib/commonjs/ui/components/AvatarCameraBadge.js +2 -2
- package/lib/commonjs/ui/components/AvatarCameraBadge.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 +13 -1
- package/lib/commonjs/ui/components/OxyAccountDialogScreen.js.map +1 -1
- package/lib/commonjs/ui/components/OxyAuthChooser.js +29 -24
- package/lib/commonjs/ui/components/OxyAuthChooser.js.map +1 -1
- package/lib/commonjs/ui/components/OxyProvider.js +8 -7
- 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 +20 -26
- package/lib/commonjs/ui/components/ProfileButton.js.map +1 -1
- package/lib/commonjs/ui/components/authChooser/AccountsMenuView.js +68 -58
- package/lib/commonjs/ui/components/authChooser/AccountsMenuView.js.map +1 -1
- package/lib/commonjs/ui/components/authChooser/types.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 +3 -1
- 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 +32 -46
- package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
- package/lib/commonjs/ui/context/commitSessionFlow.js +3 -43
- package/lib/commonjs/ui/context/commitSessionFlow.js.map +1 -1
- package/lib/commonjs/ui/context/hooks/useAuthOperations.js +15 -2
- package/lib/commonjs/ui/context/hooks/useAuthOperations.js.map +1 -1
- package/lib/commonjs/ui/context/useOxyAccountGraph.js +3 -4
- package/lib/commonjs/ui/context/useOxyAccountGraph.js.map +1 -1
- package/lib/commonjs/ui/hooks/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 +3 -2
- 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 +8 -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 +3 -2
- package/lib/commonjs/ui/hooks/useOnlineStatus.js.map +1 -1
- package/lib/commonjs/ui/hooks/useSessionManagement.js +0 -2
- package/lib/commonjs/ui/hooks/useSessionManagement.js.map +1 -1
- package/lib/commonjs/ui/hooks/useSettingToggle.js +4 -4
- package/lib/commonjs/ui/hooks/useSettingToggle.js.map +1 -1
- package/lib/commonjs/ui/hooks/useSurfaceHeader.js +68 -11
- package/lib/commonjs/ui/hooks/useSurfaceHeader.js.map +1 -1
- package/lib/commonjs/ui/navigation/accountDialogManager.js +2 -0
- package/lib/commonjs/ui/navigation/accountDialogManager.js.map +1 -1
- package/lib/commonjs/ui/oauth/browserAuthTransport.js +66 -64
- package/lib/commonjs/ui/oauth/browserAuthTransport.js.map +1 -1
- package/lib/commonjs/ui/oauth/oauthPopup.js +47 -0
- 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 +41 -19
- 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 +6 -7
- 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 +46 -14
- 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 +2 -3
- 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 +90 -89
- 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 +9 -34
- 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 +17 -7
- 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 +13 -7
- package/lib/commonjs/ui/screens/UserListScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js +5 -6
- package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/fileManagement/PhotoPickerSection.js +1 -4
- package/lib/commonjs/ui/screens/fileManagement/PhotoPickerSection.js.map +1 -1
- package/lib/commonjs/ui/screens/fileManagement/hooks/useFileUploadState.js +34 -24
- 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 +3 -4
- 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/backgroundSession.js +258 -0
- package/lib/commonjs/ui/session/backgroundSession.js.map +1 -0
- package/lib/commonjs/ui/session/index.js +7 -0
- package/lib/commonjs/ui/session/index.js.map +1 -1
- package/lib/commonjs/ui/session/useBackgroundSessionSync.js +81 -0
- package/lib/commonjs/ui/session/useBackgroundSessionSync.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/netConnectivity.js +28 -0
- package/lib/commonjs/ui/utils/netConnectivity.js.map +1 -0
- package/lib/commonjs/ui/utils/oauthReturn.js +19 -30
- package/lib/commonjs/ui/utils/oauthReturn.js.map +1 -1
- package/lib/commonjs/ui/utils/userUtils.js +27 -28
- package/lib/commonjs/ui/utils/userUtils.js.map +1 -1
- package/lib/module/index.js +20 -8
- package/lib/module/index.js.map +1 -1
- package/lib/module/notifications/deviceNotifications.js +62 -0
- package/lib/module/notifications/deviceNotifications.js.map +1 -1
- package/lib/module/ui/boot/runProviderColdBoot.js +21 -65
- package/lib/module/ui/boot/runProviderColdBoot.js.map +1 -1
- package/lib/module/ui/components/AvatarCameraBadge.js +1 -1
- package/lib/module/ui/components/AvatarCameraBadge.js.map +1 -1
- package/lib/module/ui/components/FollowButton.js +1 -1
- package/lib/module/ui/components/FollowButton.js.map +1 -1
- package/lib/module/ui/components/OxyAccountDialogScreen.js +13 -1
- package/lib/module/ui/components/OxyAccountDialogScreen.js.map +1 -1
- package/lib/module/ui/components/OxyAuthChooser.js +25 -20
- package/lib/module/ui/components/OxyAuthChooser.js.map +1 -1
- package/lib/module/ui/components/OxyProvider.js +7 -6
- 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 +12 -18
- package/lib/module/ui/components/ProfileButton.js.map +1 -1
- package/lib/module/ui/components/authChooser/AccountsMenuView.js +68 -58
- package/lib/module/ui/components/authChooser/AccountsMenuView.js.map +1 -1
- package/lib/module/ui/components/authChooser/types.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 +3 -1
- 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 +35 -49
- package/lib/module/ui/context/OxyContext.js.map +1 -1
- package/lib/module/ui/context/commitSessionFlow.js +3 -42
- package/lib/module/ui/context/commitSessionFlow.js.map +1 -1
- package/lib/module/ui/context/hooks/useAuthOperations.js +15 -2
- package/lib/module/ui/context/hooks/useAuthOperations.js.map +1 -1
- package/lib/module/ui/context/useOxyAccountGraph.js +3 -4
- package/lib/module/ui/context/useOxyAccountGraph.js.map +1 -1
- package/lib/module/ui/hooks/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 +3 -2
- 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 +8 -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 +3 -2
- package/lib/module/ui/hooks/useOnlineStatus.js.map +1 -1
- package/lib/module/ui/hooks/useSessionManagement.js +0 -2
- package/lib/module/ui/hooks/useSessionManagement.js.map +1 -1
- package/lib/module/ui/hooks/useSettingToggle.js +1 -1
- package/lib/module/ui/hooks/useSettingToggle.js.map +1 -1
- package/lib/module/ui/hooks/useSurfaceHeader.js +68 -11
- package/lib/module/ui/hooks/useSurfaceHeader.js.map +1 -1
- package/lib/module/ui/navigation/accountDialogManager.js +2 -0
- package/lib/module/ui/navigation/accountDialogManager.js.map +1 -1
- package/lib/module/ui/oauth/browserAuthTransport.js +66 -64
- package/lib/module/ui/oauth/browserAuthTransport.js.map +1 -1
- package/lib/module/ui/oauth/oauthPopup.js +48 -1
- 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 +37 -15
- 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 +4 -5
- 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 +45 -13
- 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 +3 -4
- 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 +94 -91
- 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 +5 -30
- 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 +18 -8
- 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 +14 -8
- package/lib/module/ui/screens/UserListScreen.js.map +1 -1
- package/lib/module/ui/screens/WelcomeNewUserScreen.js +5 -6
- package/lib/module/ui/screens/WelcomeNewUserScreen.js.map +1 -1
- package/lib/module/ui/screens/fileManagement/PhotoPickerSection.js +1 -4
- package/lib/module/ui/screens/fileManagement/PhotoPickerSection.js.map +1 -1
- package/lib/module/ui/screens/fileManagement/hooks/useFileUploadState.js +15 -5
- 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 +4 -5
- 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/backgroundSession.js +252 -0
- package/lib/module/ui/session/backgroundSession.js.map +1 -0
- package/lib/module/ui/session/index.js +1 -0
- package/lib/module/ui/session/index.js.map +1 -1
- package/lib/module/ui/session/useBackgroundSessionSync.js +76 -0
- package/lib/module/ui/session/useBackgroundSessionSync.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/netConnectivity.js +23 -0
- package/lib/module/ui/utils/netConnectivity.js.map +1 -0
- package/lib/module/ui/utils/oauthReturn.js +20 -30
- package/lib/module/ui/utils/oauthReturn.js.map +1 -1
- package/lib/module/ui/utils/userUtils.js +27 -28
- package/lib/module/ui/utils/userUtils.js.map +1 -1
- package/lib/typescript/commonjs/index.d.ts +1 -2
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/notifications/deviceNotifications.d.ts +51 -0
- package/lib/typescript/commonjs/notifications/deviceNotifications.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/boot/runProviderColdBoot.d.ts +11 -30
- package/lib/typescript/commonjs/ui/boot/runProviderColdBoot.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/AvatarCameraBadge.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 +7 -0
- 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 +2 -1
- package/lib/typescript/commonjs/ui/components/OxySignInButton.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/ProfileButton.d.ts +3 -0
- 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/types.d.ts +6 -0
- package/lib/typescript/commonjs/ui/components/authChooser/types.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 +0 -40
- package/lib/typescript/commonjs/ui/context/commitSessionFlow.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/hooks/useAuthOperations.d.ts +11 -2
- package/lib/typescript/commonjs/ui/context/hooks/useAuthOperations.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/oxyContextTypes.d.ts +26 -7
- package/lib/typescript/commonjs/ui/context/oxyContextTypes.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/useOxyAccountGraph.d.ts +0 -1
- package/lib/typescript/commonjs/ui/context/useOxyAccountGraph.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/queries/paymentTypes.d.ts +3 -2
- package/lib/typescript/commonjs/ui/hooks/queries/paymentTypes.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/queries/usePaymentQueries.d.ts +3 -2
- 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 +10 -6
- package/lib/typescript/commonjs/ui/hooks/useAuth.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useOnlineStatus.d.ts +3 -2
- package/lib/typescript/commonjs/ui/hooks/useOnlineStatus.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useSessionManagement.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useSurfaceHeader.d.ts +7 -2
- package/lib/typescript/commonjs/ui/hooks/useSurfaceHeader.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/navigation/accountDialogManager.d.ts +8 -0
- package/lib/typescript/commonjs/ui/navigation/accountDialogManager.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/oauth/browserAuthTransport.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/oauth/oauthPopup.d.ts +6 -0
- 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 +3 -0
- package/lib/typescript/commonjs/ui/screens/FollowersListScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/FollowingListScreen.d.ts +3 -0
- 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 +7 -0
- 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/backgroundSession.d.ts +42 -0
- package/lib/typescript/commonjs/ui/session/backgroundSession.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/session/index.d.ts +1 -0
- package/lib/typescript/commonjs/ui/session/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/session/useBackgroundSessionSync.d.ts +23 -0
- package/lib/typescript/commonjs/ui/session/useBackgroundSessionSync.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/types/navigation.d.ts +27 -19
- package/lib/typescript/commonjs/ui/types/navigation.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/utils/fileManagement.d.ts +5 -5
- package/lib/typescript/commonjs/ui/utils/fileManagement.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/utils/netConnectivity.d.ts +17 -0
- package/lib/typescript/commonjs/ui/utils/netConnectivity.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/utils/oauthReturn.d.ts +15 -12
- package/lib/typescript/commonjs/ui/utils/oauthReturn.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/utils/userUtils.d.ts +7 -14
- package/lib/typescript/commonjs/ui/utils/userUtils.d.ts.map +1 -1
- package/lib/typescript/module/index.d.ts +1 -2
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/lib/typescript/module/notifications/deviceNotifications.d.ts +51 -0
- package/lib/typescript/module/notifications/deviceNotifications.d.ts.map +1 -1
- package/lib/typescript/module/ui/boot/runProviderColdBoot.d.ts +11 -30
- package/lib/typescript/module/ui/boot/runProviderColdBoot.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/AvatarCameraBadge.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 +7 -0
- 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 +2 -1
- package/lib/typescript/module/ui/components/OxySignInButton.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/ProfileButton.d.ts +3 -0
- 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/types.d.ts +6 -0
- package/lib/typescript/module/ui/components/authChooser/types.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 +0 -40
- package/lib/typescript/module/ui/context/commitSessionFlow.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/hooks/useAuthOperations.d.ts +11 -2
- package/lib/typescript/module/ui/context/hooks/useAuthOperations.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/oxyContextTypes.d.ts +26 -7
- package/lib/typescript/module/ui/context/oxyContextTypes.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/useOxyAccountGraph.d.ts +0 -1
- package/lib/typescript/module/ui/context/useOxyAccountGraph.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/queries/paymentTypes.d.ts +3 -2
- package/lib/typescript/module/ui/hooks/queries/paymentTypes.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/queries/usePaymentQueries.d.ts +3 -2
- 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 +10 -6
- package/lib/typescript/module/ui/hooks/useAuth.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useOnlineStatus.d.ts +3 -2
- package/lib/typescript/module/ui/hooks/useOnlineStatus.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useSessionManagement.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useSurfaceHeader.d.ts +7 -2
- package/lib/typescript/module/ui/hooks/useSurfaceHeader.d.ts.map +1 -1
- package/lib/typescript/module/ui/navigation/accountDialogManager.d.ts +8 -0
- package/lib/typescript/module/ui/navigation/accountDialogManager.d.ts.map +1 -1
- package/lib/typescript/module/ui/oauth/browserAuthTransport.d.ts.map +1 -1
- package/lib/typescript/module/ui/oauth/oauthPopup.d.ts +6 -0
- 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 +3 -0
- package/lib/typescript/module/ui/screens/FollowersListScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/FollowingListScreen.d.ts +3 -0
- 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 +7 -0
- 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/backgroundSession.d.ts +42 -0
- package/lib/typescript/module/ui/session/backgroundSession.d.ts.map +1 -0
- package/lib/typescript/module/ui/session/index.d.ts +1 -0
- package/lib/typescript/module/ui/session/index.d.ts.map +1 -1
- package/lib/typescript/module/ui/session/useBackgroundSessionSync.d.ts +23 -0
- package/lib/typescript/module/ui/session/useBackgroundSessionSync.d.ts.map +1 -0
- package/lib/typescript/module/ui/types/navigation.d.ts +27 -19
- package/lib/typescript/module/ui/types/navigation.d.ts.map +1 -1
- package/lib/typescript/module/ui/utils/fileManagement.d.ts +5 -5
- package/lib/typescript/module/ui/utils/fileManagement.d.ts.map +1 -1
- package/lib/typescript/module/ui/utils/netConnectivity.d.ts +17 -0
- package/lib/typescript/module/ui/utils/netConnectivity.d.ts.map +1 -0
- package/lib/typescript/module/ui/utils/oauthReturn.d.ts +15 -12
- package/lib/typescript/module/ui/utils/oauthReturn.d.ts.map +1 -1
- package/lib/typescript/module/ui/utils/userUtils.d.ts +7 -14
- package/lib/typescript/module/ui/utils/userUtils.d.ts.map +1 -1
- package/lib/typescript/types/expo-image-picker.d.ts +35 -0
- package/package.json +33 -12
- package/src/index.ts +19 -16
- package/src/notifications/deviceNotifications.ts +82 -0
- package/src/types/expo-image-picker.d.ts +35 -0
- package/src/ui/boot/__tests__/coldBootNoIdpRedirect.test.ts +215 -0
- package/src/ui/boot/runProviderColdBoot.ts +24 -101
- package/src/ui/components/AvatarCameraBadge.tsx +2 -1
- package/src/ui/components/FollowButton.tsx +1 -1
- package/src/ui/components/OxyAccountDialogScreen.tsx +13 -1
- package/src/ui/components/OxyAuthChooser.tsx +31 -20
- package/src/ui/components/OxyProvider.tsx +8 -7
- package/src/ui/components/OxySignInButton.tsx +2 -1
- package/src/ui/components/ProfileButton.tsx +15 -20
- package/src/ui/components/authChooser/AccountsMenuView.tsx +66 -57
- package/src/ui/components/authChooser/types.ts +6 -0
- 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 +1 -0
- 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 +35 -46
- package/src/ui/context/__tests__/commitSessionFlow.test.ts +13 -89
- package/src/ui/context/commitSessionFlow.ts +3 -61
- package/src/ui/context/hooks/useAuthOperations.ts +26 -1
- package/src/ui/context/oxyContextTypes.ts +26 -7
- 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 +3 -2
- package/src/ui/hooks/queries/usePaymentQueries.ts +3 -2
- package/src/ui/hooks/queries/userCache.ts +169 -148
- package/src/ui/hooks/useAssets.ts +1 -1
- package/src/ui/hooks/useAsyncAction.ts +3 -3
- package/src/ui/hooks/useAuth.ts +12 -6
- package/src/ui/hooks/useAvatarPicker.ts +1 -1
- package/src/ui/hooks/useOnlineStatus.ts +3 -2
- package/src/ui/hooks/useSessionManagement.ts +0 -2
- package/src/ui/hooks/useSettingToggle.ts +1 -1
- package/src/ui/hooks/useSurfaceHeader.ts +90 -15
- package/src/ui/navigation/accountDialogManager.ts +9 -0
- package/src/ui/oauth/__tests__/oauthPopup.test.ts +26 -0
- package/src/ui/oauth/browserAuthTransport.ts +55 -49
- package/src/ui/oauth/oauthPopup.ts +61 -3
- package/src/ui/screens/AccountMembersScreen.tsx +1 -1
- package/src/ui/screens/AccountSettingsScreen.tsx +45 -17
- 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 +7 -4
- package/src/ui/screens/ConnectedAppsScreen.tsx +2 -2
- package/src/ui/screens/CreateAccountScreen.tsx +55 -15
- package/src/ui/screens/EditProfileFieldScreen.tsx +4 -4
- package/src/ui/screens/EditProfileScreen.tsx +6 -3
- package/src/ui/screens/FAQScreen.tsx +1 -1
- package/src/ui/screens/FeedbackScreen.tsx +741 -575
- package/src/ui/screens/FileManagementScreen.tsx +1 -1
- package/src/ui/screens/FollowersListScreen.tsx +3 -0
- package/src/ui/screens/FollowingListScreen.tsx +3 -0
- package/src/ui/screens/HelpSupportScreen.tsx +1 -1
- package/src/ui/screens/HistoryViewScreen.tsx +5 -20
- package/src/ui/screens/LanguageSelectorScreen.tsx +1 -1
- package/src/ui/screens/LegalDocumentsScreen.tsx +1 -1
- package/src/ui/screens/ManageAccountScreen.tsx +9 -2
- package/src/ui/screens/PremiumSubscriptionScreen.tsx +4 -4
- package/src/ui/screens/PrivacySettingsScreen.tsx +15 -12
- package/src/ui/screens/ProfileScreen.tsx +24 -6
- package/src/ui/screens/SavesCollectionsScreen.tsx +1 -1
- package/src/ui/screens/UserListScreen.tsx +18 -8
- 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 +14 -5
- package/src/ui/screens/trust/TrustCenterScreen.tsx +2 -2
- package/src/ui/screens/trust/TrustLeaderboardScreen.tsx +6 -5
- 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/__tests__/backgroundSession.test.ts +392 -0
- package/src/ui/session/backgroundSession.ts +313 -0
- package/src/ui/session/index.ts +1 -0
- package/src/ui/session/useBackgroundSessionSync.ts +92 -0
- package/src/ui/types/navigation.ts +27 -19
- package/src/ui/utils/fileManagement.ts +108 -92
- package/src/ui/utils/netConnectivity.ts +27 -0
- package/src/ui/utils/oauthReturn.ts +23 -33
- package/src/ui/utils/userUtils.ts +27 -32
- package/lib/commonjs/ui/oauth/legacyRedirectLanes.js +0 -48
- package/lib/commonjs/ui/oauth/legacyRedirectLanes.js.map +0 -1
- package/lib/commonjs/ui/utils/crossOriginRestore.js +0 -140
- package/lib/commonjs/ui/utils/crossOriginRestore.js.map +0 -1
- package/lib/module/ui/oauth/legacyRedirectLanes.js +0 -44
- package/lib/module/ui/oauth/legacyRedirectLanes.js.map +0 -1
- package/lib/module/ui/utils/crossOriginRestore.js +0 -131
- package/lib/module/ui/utils/crossOriginRestore.js.map +0 -1
- package/lib/typescript/commonjs/ui/oauth/legacyRedirectLanes.d.ts +0 -40
- package/lib/typescript/commonjs/ui/oauth/legacyRedirectLanes.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/utils/crossOriginRestore.d.ts +0 -43
- package/lib/typescript/commonjs/ui/utils/crossOriginRestore.d.ts.map +0 -1
- package/lib/typescript/module/ui/oauth/legacyRedirectLanes.d.ts +0 -40
- package/lib/typescript/module/ui/oauth/legacyRedirectLanes.d.ts.map +0 -1
- package/lib/typescript/module/ui/utils/crossOriginRestore.d.ts +0 -43
- package/lib/typescript/module/ui/utils/crossOriginRestore.d.ts.map +0 -1
- package/src/ui/boot/__tests__/coldBootWebAuthMode.test.ts +0 -281
- package/src/ui/oauth/legacyRedirectLanes.ts +0 -43
- package/src/ui/utils/__tests__/crossOriginRestore.test.ts +0 -143
- package/src/ui/utils/crossOriginRestore.ts +0 -169
|
@@ -105,7 +105,8 @@ export interface OxySignInButtonProps {
|
|
|
105
105
|
* onOAuthResult={({ redirectUrl, state, codeVerifier }) => {
|
|
106
106
|
* if (!redirectUrl) return;
|
|
107
107
|
* const code = new URL(redirectUrl).searchParams.get('code');
|
|
108
|
-
* // → POST /auth/oauth/token
|
|
108
|
+
* // → POST /auth/oauth/token, form-urlencoded:
|
|
109
|
+
* // grant_type=authorization_code&code=…&redirect_uri=…&client_id=…&code_verifier=…
|
|
109
110
|
* }}
|
|
110
111
|
* />
|
|
111
112
|
* ```
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
import { useCallback, useEffect, useMemo, useState } from 'react';
|
|
3
3
|
import {
|
|
4
|
-
View,
|
|
5
|
-
Pressable,
|
|
6
4
|
StyleSheet,
|
|
7
5
|
Platform,
|
|
8
6
|
type StyleProp,
|
|
9
7
|
type ViewStyle,
|
|
10
8
|
} from 'react-native';
|
|
9
|
+
import { View, Pressable } from 'react-native-css/components';
|
|
11
10
|
import MaterialCommunityIcons from '@expo/vector-icons/MaterialCommunityIcons';
|
|
12
11
|
import { Avatar } from '@oxyhq/bloom/avatar';
|
|
13
12
|
import * as Skeleton from '@oxyhq/bloom/skeleton';
|
|
14
13
|
import { Text } from '@oxyhq/bloom/typography';
|
|
15
14
|
import { useTheme } from '@oxyhq/bloom/theme';
|
|
16
|
-
import { getAccountDisplayName, getAccountFallbackHandle } from '@oxyhq/core';
|
|
15
|
+
import { getAccountDisplayName, getAccountFallbackHandle, getNormalizedUserHandle } from '@oxyhq/core';
|
|
17
16
|
import { useAuth } from '../hooks/useAuth';
|
|
18
17
|
import { useOxy } from '../context/OxyContext';
|
|
19
18
|
import { useI18n } from '../hooks/useI18n';
|
|
20
19
|
import { registerAccountDialogConsumerHooks } from '../navigation/accountDialogManager';
|
|
20
|
+
import type { AccountDialogMenuItem } from '../navigation/accountDialogManager';
|
|
21
21
|
|
|
22
22
|
const isWeb = Platform.OS === 'web';
|
|
23
23
|
|
|
@@ -30,7 +30,6 @@ const isWeb = Platform.OS === 'web';
|
|
|
30
30
|
*/
|
|
31
31
|
const BG_TRANSITION_MS = 150;
|
|
32
32
|
const AVATAR_TRANSITION_MS = 250;
|
|
33
|
-
const OPACITY_TRANSITION_MS = 150;
|
|
34
33
|
const LEAVE_DELAY_MS = 50;
|
|
35
34
|
|
|
36
35
|
/** Shrunk-avatar scale on hover, matching Bluesky's `scale: 2/3`. */
|
|
@@ -64,6 +63,8 @@ export interface ProfileButtonProps {
|
|
|
64
63
|
onAddAccount?: () => void;
|
|
65
64
|
/** Optional: navigate to the signed-in user's own profile. */
|
|
66
65
|
onNavigateProfile?: () => void;
|
|
66
|
+
/** App-owned actions rendered in the shared account menu. */
|
|
67
|
+
menuItems?: readonly AccountDialogMenuItem[];
|
|
67
68
|
/**
|
|
68
69
|
* Retained for source compatibility. The trigger now opens the unified
|
|
69
70
|
* `OxyAccountDialogScreen` (a centered / bottom-sheet modal) rather than an
|
|
@@ -106,6 +107,7 @@ const ProfileButton: React.FC<ProfileButtonProps> = ({
|
|
|
106
107
|
onNavigateManage,
|
|
107
108
|
onAddAccount,
|
|
108
109
|
onNavigateProfile,
|
|
110
|
+
menuItems,
|
|
109
111
|
className,
|
|
110
112
|
style,
|
|
111
113
|
}) => {
|
|
@@ -139,8 +141,9 @@ const ProfileButton: React.FC<ProfileButtonProps> = ({
|
|
|
139
141
|
onNavigateManage,
|
|
140
142
|
onAddAccount,
|
|
141
143
|
onNavigateProfile,
|
|
144
|
+
menuItems,
|
|
142
145
|
});
|
|
143
|
-
}, [onNavigateManage, onAddAccount, onNavigateProfile]);
|
|
146
|
+
}, [onNavigateManage, onAddAccount, onNavigateProfile, menuItems]);
|
|
144
147
|
|
|
145
148
|
const avatarUrl = useMemo(
|
|
146
149
|
() => (user?.avatar ? oxyServices.getFileDownloadUrl(user.avatar, 'thumb') : undefined),
|
|
@@ -201,7 +204,10 @@ const ProfileButton: React.FC<ProfileButtonProps> = ({
|
|
|
201
204
|
}
|
|
202
205
|
|
|
203
206
|
// ── Signed in: avatar + identity + chevron. ─────────────────────────────
|
|
204
|
-
const displayName =
|
|
207
|
+
const displayName =
|
|
208
|
+
user?.name?.displayName ??
|
|
209
|
+
getNormalizedUserHandle(user) ??
|
|
210
|
+
getAccountDisplayName(null, locale);
|
|
205
211
|
const handle = getAccountFallbackHandle(user);
|
|
206
212
|
const handleLine = handle ? `@${handle}` : null;
|
|
207
213
|
|
|
@@ -298,22 +304,11 @@ const ProfileButton: React.FC<ProfileButtonProps> = ({
|
|
|
298
304
|
}
|
|
299
305
|
: undefined;
|
|
300
306
|
|
|
307
|
+
// Expanded mode always shows identity + chevron (console/inbox wide sidebar).
|
|
308
|
+
// Hover only animates the row background and avatar shrink — not text visibility.
|
|
301
309
|
const identityStyle: ViewStyle | undefined = isWeb
|
|
302
310
|
? {
|
|
303
311
|
marginLeft: -resolvedAvatarSize / 2,
|
|
304
|
-
opacity: active ? 1 : 0,
|
|
305
|
-
transitionProperty: 'opacity',
|
|
306
|
-
transitionDuration: `${OPACITY_TRANSITION_MS}ms`,
|
|
307
|
-
transitionDelay: active ? '0ms' : `${LEAVE_DELAY_MS}ms`,
|
|
308
|
-
}
|
|
309
|
-
: undefined;
|
|
310
|
-
|
|
311
|
-
const chevronStyle: ViewStyle | undefined = isWeb
|
|
312
|
-
? {
|
|
313
|
-
opacity: active ? 1 : 0,
|
|
314
|
-
transitionProperty: 'opacity',
|
|
315
|
-
transitionDuration: `${OPACITY_TRANSITION_MS}ms`,
|
|
316
|
-
transitionDelay: active ? '0ms' : `${LEAVE_DELAY_MS}ms`,
|
|
317
312
|
}
|
|
318
313
|
: undefined;
|
|
319
314
|
|
|
@@ -343,7 +338,7 @@ const ProfileButton: React.FC<ProfileButtonProps> = ({
|
|
|
343
338
|
</Text>
|
|
344
339
|
) : null}
|
|
345
340
|
</View>
|
|
346
|
-
<View
|
|
341
|
+
<View>
|
|
347
342
|
<MaterialCommunityIcons
|
|
348
343
|
name="dots-horizontal"
|
|
349
344
|
size={18}
|
|
@@ -99,11 +99,6 @@ const FACEPILE_AVATAR_SIZE = 32;
|
|
|
99
99
|
*/
|
|
100
100
|
const FACEPILE_OVERLAP = 4;
|
|
101
101
|
|
|
102
|
-
// Vite/RN-Web does not install NativeWind's Metro global className polyfill.
|
|
103
|
-
// Use react-native-css components explicitly so this className markup also
|
|
104
|
-
// works in Vite web hosts.
|
|
105
|
-
const AnimatedCssView = Animated.createAnimatedComponent(View);
|
|
106
|
-
|
|
107
102
|
/**
|
|
108
103
|
* The hero's address line, shown under the "Hi, <name>!" greeting: the account's
|
|
109
104
|
* canonical `@oxy.so` email when it has one, else its normalized `@handle`. Never
|
|
@@ -217,6 +212,7 @@ const AccountsMenuView: React.FC<AccountsMenuViewProps> = ({
|
|
|
217
212
|
// compact header it is not represented anywhere else once the hero moved out
|
|
218
213
|
// of the card, and the list is where you switch back to it.
|
|
219
214
|
const switchableAccounts = current ? [current, ...others] : others;
|
|
215
|
+
const switchableAccountKey = switchableAccounts.map((account) => account.accountId).join(':');
|
|
220
216
|
const facepile: AvatarGroupItem[] = switchableAccounts.map((account) => ({
|
|
221
217
|
id: account.accountId,
|
|
222
218
|
uri: account.avatarUrl ?? undefined,
|
|
@@ -386,61 +382,66 @@ const AccountsMenuView: React.FC<AccountsMenuViewProps> = ({
|
|
|
386
382
|
{/* SWITCH ACCOUNT — own NativeWind card, NOT a Bloom grouped section: it
|
|
387
383
|
is a disclosure header over an animated list, not a list of settings
|
|
388
384
|
rows, and the grouped section is not a bare card container. */}
|
|
389
|
-
<
|
|
390
|
-
<
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
385
|
+
<View className="mb-space-16">
|
|
386
|
+
<Animated.View style={[{ overflow: 'hidden' }, switchCardStyle]}>
|
|
387
|
+
<View className="bg-fill">
|
|
388
|
+
<HoverPressable
|
|
389
|
+
baseClassName={`flex-row items-center gap-space-12 px-space-12 py-[10px] min-h-[44px]${
|
|
390
|
+
switchingDisabled ? ' opacity-60' : ''
|
|
391
|
+
}`}
|
|
392
|
+
hoverClassName="bg-fill-secondary"
|
|
393
|
+
onPress={toggleExpanded}
|
|
394
|
+
disabled={switchingDisabled}
|
|
395
|
+
accessibilityRole="button"
|
|
396
|
+
// The ARIA prop, not `accessibilityState`: react-native-web 0.21
|
|
397
|
+
// forwards only this one, and RN maps it to
|
|
398
|
+
// `accessibilityState.expanded` natively — so the disclosure state
|
|
399
|
+
// reaches assistive tech on BOTH platforms.
|
|
400
|
+
aria-expanded={expanded}
|
|
401
|
+
accessibilityLabel={switchLabel}
|
|
402
|
+
>
|
|
403
|
+
<Text className="flex-1 text-body text-text" numberOfLines={1}>
|
|
404
|
+
{switchLabel}
|
|
405
|
+
</Text>
|
|
406
|
+
{/* The facepile previews who you can switch to; once the list is open
|
|
407
|
+
it would just restate the rows below it. */}
|
|
408
|
+
{expanded ? null : (
|
|
409
|
+
<AvatarGroup
|
|
410
|
+
items={facepile}
|
|
411
|
+
layout="stack"
|
|
412
|
+
size={FACEPILE_AVATAR_SIZE}
|
|
413
|
+
max={FACEPILE_MAX}
|
|
414
|
+
overlap={FACEPILE_OVERLAP}
|
|
415
|
+
variant="thumb"
|
|
416
|
+
showInitials
|
|
417
|
+
ringColor={theme.colors.card}
|
|
418
|
+
/>
|
|
419
|
+
)}
|
|
420
|
+
<View style={[styles.chevronCircle, { backgroundColor: theme.colors.contrast50 }]}>
|
|
421
|
+
<Animated.View style={chevronStyle}>
|
|
422
|
+
<MaterialCommunityIcons name="chevron-down" size={20} color={theme.colors.text} />
|
|
423
|
+
</Animated.View>
|
|
424
|
+
</View>
|
|
425
|
+
</HoverPressable>
|
|
428
426
|
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
>
|
|
436
|
-
<View
|
|
437
|
-
style={styles.collapseMeasure}
|
|
438
|
-
onLayout={(event) => setListContentHeight(event.nativeEvent.layout.height)}
|
|
427
|
+
{/* Animated reveal: an overflow-clipped container whose height + opacity
|
|
428
|
+
are driven by `listProgress`; the inner style-based wrapper measures
|
|
429
|
+
the natural content height via `onLayout`. */}
|
|
430
|
+
<Animated.View
|
|
431
|
+
style={[styles.collapse, listStyle]}
|
|
432
|
+
pointerEvents={expanded ? 'auto' : 'none'}
|
|
439
433
|
>
|
|
440
|
-
<View
|
|
434
|
+
<View
|
|
435
|
+
key={switchableAccountKey}
|
|
436
|
+
style={styles.collapseMeasure}
|
|
437
|
+
onLayout={(event) => setListContentHeight(event.nativeEvent.layout.height)}
|
|
438
|
+
>
|
|
439
|
+
<View>{listItems}</View>
|
|
440
|
+
</View>
|
|
441
|
+
</Animated.View>
|
|
441
442
|
</View>
|
|
442
|
-
</
|
|
443
|
-
</
|
|
443
|
+
</Animated.View>
|
|
444
|
+
</View>
|
|
444
445
|
|
|
445
446
|
{/* OXY STORAGE — own NativeWind card for the same reason: a title, a meter
|
|
446
447
|
and two chips are not settings rows. Its cloud sits in the same 20px
|
|
@@ -489,6 +490,14 @@ const AccountsMenuView: React.FC<AccountsMenuViewProps> = ({
|
|
|
489
490
|
title={t('accountMenu.help')}
|
|
490
491
|
onPress={menu.onHelp}
|
|
491
492
|
/>
|
|
493
|
+
{menu.customItems.map((item) => (
|
|
494
|
+
<SettingsListItem
|
|
495
|
+
key={item.key}
|
|
496
|
+
icon={<MenuIcon name={(item.icon ?? 'dots-horizontal') as keyof typeof MaterialCommunityIcons.glyphMap} theme={theme} />}
|
|
497
|
+
title={item.label}
|
|
498
|
+
onPress={item.onPress}
|
|
499
|
+
/>
|
|
500
|
+
))}
|
|
492
501
|
<SettingsListItem
|
|
493
502
|
icon={<MenuIcon name="logout" theme={theme} />}
|
|
494
503
|
title={t('accountMenu.signOut')}
|
|
@@ -2,7 +2,7 @@ import type React from 'react';
|
|
|
2
2
|
import { View, Text, TouchableOpacity, ScrollView, StyleSheet } from 'react-native';
|
|
3
3
|
import { Image as ExpoImage } from 'expo-image';
|
|
4
4
|
import Ionicons from '@expo/vector-icons/Ionicons';
|
|
5
|
-
import { Dialog, type DialogControlProps } from '@oxyhq/bloom';
|
|
5
|
+
import { Dialog, type DialogControlProps } from '@oxyhq/bloom/dialog';
|
|
6
6
|
import { useTheme } from '@oxyhq/bloom/theme';
|
|
7
7
|
import { formatFileSize, getFileIcon } from '../../utils/fileManagement';
|
|
8
8
|
import type { PendingUploadFile } from '../../screens/fileManagement/shared';
|
|
@@ -64,6 +64,7 @@ const PinInput = forwardRef<PinInputHandle, PinInputProps>(({ value, onChange, l
|
|
|
64
64
|
<View style={styles.pinContainer}>
|
|
65
65
|
{Array.from({ length }).map((_, idx) => (
|
|
66
66
|
<TextInput
|
|
67
|
+
// biome-ignore lint/suspicious/noArrayIndexKey: fixed-position PIN cells, order never changes
|
|
67
68
|
key={`pin-input-${idx}`}
|
|
68
69
|
ref={(ref) => { inputs.current[idx] = ref; }}
|
|
69
70
|
style={[
|
|
@@ -55,13 +55,13 @@ export const LogoText: React.FC<LogoTextProps> = ({
|
|
|
55
55
|
return (
|
|
56
56
|
<Svg viewBox={`0 0 ${VIEW_BOX_WIDTH} ${VIEW_BOX_HEIGHT}`} width={width} height={height} style={style}>
|
|
57
57
|
<G>
|
|
58
|
-
{OUTER_PATHS.map((d
|
|
59
|
-
<Path key={
|
|
58
|
+
{OUTER_PATHS.map((d) => (
|
|
59
|
+
<Path key={d} d={d} fill={resolvedColor} />
|
|
60
60
|
))}
|
|
61
61
|
</G>
|
|
62
62
|
<G transform="translate(10.316 2.495)">
|
|
63
|
-
{INNER_LETTER_PATHS.map((d
|
|
64
|
-
<Path key={
|
|
63
|
+
{INNER_LETTER_PATHS.map((d) => (
|
|
64
|
+
<Path key={d} d={d} fill={resolvedLetterColor} />
|
|
65
65
|
))}
|
|
66
66
|
</G>
|
|
67
67
|
</Svg>
|
|
@@ -6,7 +6,7 @@ import { Button } from '@oxyhq/bloom/button';
|
|
|
6
6
|
import { TextField, TextFieldInput } from '@oxyhq/bloom/text-field';
|
|
7
7
|
import FAIRWalletIcon from '../icon/FAIRWalletIcon';
|
|
8
8
|
import { createPaymentStyles } from './paymentStyles';
|
|
9
|
-
import { toast } from '@oxyhq/bloom';
|
|
9
|
+
import { toast } from '@oxyhq/bloom/toast';
|
|
10
10
|
import type { CardDetails, PaymentColors, PaymentStepAnimations } from './types';
|
|
11
11
|
import { useI18n } from '../../hooks/useI18n';
|
|
12
12
|
|
|
@@ -85,9 +85,9 @@ const PaymentSummaryStep: React.FC<PaymentSummaryStepProps> = ({
|
|
|
85
85
|
<>
|
|
86
86
|
<View style={styles.summaryCardItems}>
|
|
87
87
|
<SettingsListGroup>
|
|
88
|
-
{paymentItems.map((item
|
|
88
|
+
{paymentItems.map((item) => (
|
|
89
89
|
<SettingsListItem
|
|
90
|
-
key={
|
|
90
|
+
key={`${item.type}-${item.name}-${item.price}-${item.period ?? ''}`}
|
|
91
91
|
icon={<Ionicons name={getItemTypeIcon(item.type)} size={20} color={colors.primary} />}
|
|
92
92
|
title={`${item.type === 'product' && item.quantity ? `${item.quantity} \u00d7 ` : ''}${item.name}${item.type === 'subscription' && item.period ? ` (${item.period})` : ''}`}
|
|
93
93
|
description={item.description || `${item.currency ? (CURRENCY_SYMBOLS[item.currency.toUpperCase()] || item.currency) : currencySymbol} ${item.price * (item.quantity ?? 1)}`}
|
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import type {
|
|
3
|
-
import type
|
|
4
|
-
import type {
|
|
1
|
+
import type Ionicons from "@expo/vector-icons/Ionicons";
|
|
2
|
+
import type { ThemeColors } from "@oxyhq/bloom/theme";
|
|
3
|
+
import type React from "react";
|
|
4
|
+
import type { Animated } from "react-native";
|
|
5
5
|
|
|
6
6
|
export type PaymentItem = {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
7
|
+
type: "product" | "subscription" | "service" | "fee" | string;
|
|
8
|
+
name: string;
|
|
9
|
+
description?: string;
|
|
10
|
+
quantity?: number;
|
|
11
|
+
period?: string;
|
|
12
|
+
price: number;
|
|
13
|
+
currency?: string;
|
|
14
14
|
};
|
|
15
15
|
|
|
16
16
|
export interface PaymentGatewayResult {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
success: boolean;
|
|
18
|
+
details?: Record<string, string | number | boolean | null>;
|
|
19
|
+
error?: string;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
export interface CardDetails {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
number: string;
|
|
24
|
+
expiry: string;
|
|
25
|
+
cvv: string;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
export interface PaymentMethod {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
key: string;
|
|
30
|
+
label: string;
|
|
31
|
+
icon: React.ComponentProps<typeof Ionicons>["name"];
|
|
32
|
+
description: string;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
export interface PaymentStepAnimations {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
fadeAnim: Animated.Value;
|
|
37
|
+
slideAnim: Animated.Value;
|
|
38
|
+
scaleAnim: Animated.Value;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
/**
|
|
@@ -26,7 +26,6 @@ import {
|
|
|
26
26
|
startTokenRefreshScheduler,
|
|
27
27
|
createAccountDialogController,
|
|
28
28
|
logger as loggerUtil,
|
|
29
|
-
syncHubAfterSignIn,
|
|
30
29
|
} from '@oxyhq/core';
|
|
31
30
|
import {
|
|
32
31
|
registerAccountDialogControls,
|
|
@@ -71,6 +70,7 @@ import {
|
|
|
71
70
|
activeUserOf,
|
|
72
71
|
accountIdsOf,
|
|
73
72
|
IdentityBoundSessionError,
|
|
73
|
+
useBackgroundSessionSync,
|
|
74
74
|
type IdentitySessionBinding,
|
|
75
75
|
} from '../session';
|
|
76
76
|
import type {
|
|
@@ -79,7 +79,7 @@ import type {
|
|
|
79
79
|
CommitInput,
|
|
80
80
|
} from './oxyContextTypes';
|
|
81
81
|
import { DEFAULT_SESSION_VALIDITY_MS, loadUseFollowHook } from './oxyContextHelpers';
|
|
82
|
-
import { commitDeviceSetAndResolve
|
|
82
|
+
import { commitDeviceSetAndResolve } from './commitSessionFlow';
|
|
83
83
|
import { runPasskeyLogin, runPasskeyRegister, runPasskeyAdd } from './passkeyFlow';
|
|
84
84
|
import {
|
|
85
85
|
isPasskeySupported,
|
|
@@ -103,8 +103,8 @@ export const OxyProvider: React.FC<OxyContextProviderProps> = ({
|
|
|
103
103
|
storageKeyPrefix = 'oxy_session',
|
|
104
104
|
clientId: clientIdProp,
|
|
105
105
|
sessionMode = 'account',
|
|
106
|
-
webAuthMode = '
|
|
107
|
-
|
|
106
|
+
webAuthMode = 'popup',
|
|
107
|
+
backgroundSession = false,
|
|
108
108
|
onAuthStateChange,
|
|
109
109
|
onError,
|
|
110
110
|
}) => {
|
|
@@ -501,6 +501,12 @@ export const OxyProvider: React.FC<OxyContextProviderProps> = ({
|
|
|
501
501
|
logoutStore,
|
|
502
502
|
setAuthState,
|
|
503
503
|
logger,
|
|
504
|
+
...(identity
|
|
505
|
+
? {
|
|
506
|
+
identityBinding: identity.binding,
|
|
507
|
+
refreshPinnedAccountId: () => identity.refreshPinnedAccountId(),
|
|
508
|
+
}
|
|
509
|
+
: {}),
|
|
504
510
|
});
|
|
505
511
|
|
|
506
512
|
// "That wasn't me": repudiating a flagged sign-in IS revoking the device
|
|
@@ -580,7 +586,7 @@ export const OxyProvider: React.FC<OxyContextProviderProps> = ({
|
|
|
580
586
|
};
|
|
581
587
|
handleTokenChange(oxyServices.getAccessToken());
|
|
582
588
|
return oxyServices.onTokensChanged(handleTokenChange);
|
|
583
|
-
}, [logger, oxyServices]);
|
|
589
|
+
}, [logger, oxyServices, sessionClient]);
|
|
584
590
|
|
|
585
591
|
// Unified in-session refresh (SDK-owned; every RP inherits it). Installs the
|
|
586
592
|
// ONE core refresh handler (re-mint from the persisted zero-cookie device
|
|
@@ -610,10 +616,7 @@ export const OxyProvider: React.FC<OxyContextProviderProps> = ({
|
|
|
610
616
|
// Used by the QR device flow (`handleWebSession`), password sign-in, 2FA
|
|
611
617
|
// completion, and the cold boot.
|
|
612
618
|
const commitSession = useCallback(
|
|
613
|
-
async (
|
|
614
|
-
input: CommitInput,
|
|
615
|
-
options: { activate: boolean; hubSync?: boolean },
|
|
616
|
-
): Promise<void> => {
|
|
619
|
+
async (input: CommitInput, options: { activate: boolean }): Promise<void> => {
|
|
617
620
|
if (input.accessToken) {
|
|
618
621
|
oxyServices.setTokens(input.accessToken);
|
|
619
622
|
}
|
|
@@ -681,21 +684,8 @@ export const OxyProvider: React.FC<OxyContextProviderProps> = ({
|
|
|
681
684
|
onAuthStateChange: onAuthStateChangeRef.current,
|
|
682
685
|
markAuthResolved: markAuthResolvedRef.current,
|
|
683
686
|
});
|
|
684
|
-
|
|
685
|
-
// Post-sign-in hub sync — a full-page redirect to auth.oxy.so. Gated HERE,
|
|
686
|
-
// inside the ONE commit funnel, so NO commit path (QR device flow,
|
|
687
|
-
// password/2FA through the account dialog, passkey, popup OAuth, cold
|
|
688
|
-
// boot) can bounce a `webAuthMode: 'popup'` tab to the IdP. See
|
|
689
|
-
// `maybeSyncHubAfterCommit` for the full gate list.
|
|
690
|
-
await maybeSyncHubAfterCommit({
|
|
691
|
-
activate: options.activate,
|
|
692
|
-
hubSyncRequested: options.hubSync === true,
|
|
693
|
-
hubSyncEnabled: hubSync,
|
|
694
|
-
webAuthMode,
|
|
695
|
-
syncHub: () => syncHubAfterSignIn(oxyServices, { enabled: hubSync }),
|
|
696
|
-
});
|
|
697
687
|
},
|
|
698
|
-
[oxyServices, authStore, updateSessions, setActiveSessionId, sessionClient, sessionClientHost, syncFromClient, loginSuccess, logger
|
|
688
|
+
[oxyServices, authStore, updateSessions, setActiveSessionId, sessionClient, sessionClientHost, syncFromClient, loginSuccess, logger],
|
|
699
689
|
);
|
|
700
690
|
const commitSessionRef = useRef(commitSession);
|
|
701
691
|
commitSessionRef.current = commitSession;
|
|
@@ -717,16 +707,16 @@ export const OxyProvider: React.FC<OxyContextProviderProps> = ({
|
|
|
717
707
|
userId: session.user.id,
|
|
718
708
|
user: session.user,
|
|
719
709
|
},
|
|
720
|
-
{ activate: true
|
|
710
|
+
{ activate: true },
|
|
721
711
|
);
|
|
722
712
|
},
|
|
723
713
|
[commitSession],
|
|
724
714
|
);
|
|
725
715
|
|
|
726
|
-
// Commit a minted graph-SWITCH session
|
|
727
|
-
//
|
|
728
|
-
//
|
|
729
|
-
//
|
|
716
|
+
// Commit a minted graph-SWITCH session through the same funnel as
|
|
717
|
+
// `handleWebSession`. Nothing extra to do IN-PLACE: the switch already
|
|
718
|
+
// propagates across tabs/apps via the server's `session_state` socket
|
|
719
|
+
// broadcast.
|
|
730
720
|
const commitSwitchedSession = useCallback(
|
|
731
721
|
async (session: SessionLoginResponse): Promise<void> => {
|
|
732
722
|
if (!session?.user || !session?.sessionId || !session.accessToken) {
|
|
@@ -742,7 +732,7 @@ export const OxyProvider: React.FC<OxyContextProviderProps> = ({
|
|
|
742
732
|
userId: session.user.id,
|
|
743
733
|
user: session.user,
|
|
744
734
|
},
|
|
745
|
-
{ activate: true
|
|
735
|
+
{ activate: true },
|
|
746
736
|
);
|
|
747
737
|
},
|
|
748
738
|
[commitSession],
|
|
@@ -753,11 +743,6 @@ export const OxyProvider: React.FC<OxyContextProviderProps> = ({
|
|
|
753
743
|
// to, so no consumer ever writes popup listeners or a token exchange. The
|
|
754
744
|
// transport picks popup vs redirect from `webAuthMode`; both lanes land on the
|
|
755
745
|
// SAME completion path (`completeOAuthCode`) and the same commit funnel here.
|
|
756
|
-
//
|
|
757
|
-
// `hubSync: false` is deliberate: hub sync is a full-page redirect to
|
|
758
|
-
// auth.oxy.so, which would undo the one thing popup mode exists to guarantee —
|
|
759
|
-
// that the relying party never leaves its route. It matches how the redirect
|
|
760
|
-
// lane's return leg commits (see `runProviderColdBoot`).
|
|
761
746
|
const startWebOAuthSignInForContext = useCallback(
|
|
762
747
|
(options: StartWebOAuthSignInOptions): Promise<WebOAuthSignInResult> =>
|
|
763
748
|
startWebOAuthSignIn(
|
|
@@ -767,8 +752,7 @@ export const OxyProvider: React.FC<OxyContextProviderProps> = ({
|
|
|
767
752
|
clientId,
|
|
768
753
|
authorizeBaseUrl,
|
|
769
754
|
identityBound: isIdentityBound,
|
|
770
|
-
commitSession: (input) =>
|
|
771
|
-
commitSessionRef.current(input, { activate: true, hubSync: false }),
|
|
755
|
+
commitSession: (input) => commitSessionRef.current(input, { activate: true }),
|
|
772
756
|
},
|
|
773
757
|
options,
|
|
774
758
|
),
|
|
@@ -967,7 +951,7 @@ export const OxyProvider: React.FC<OxyContextProviderProps> = ({
|
|
|
967
951
|
getLoginOptions: (username) => oxyServices.webauthnLoginOptions(username),
|
|
968
952
|
runCeremony: runAuthenticationCeremony,
|
|
969
953
|
loginVerify: (response, envelope) => oxyServices.webauthnLoginVerify(response, envelope),
|
|
970
|
-
commit: (input) => commitSession(input, { activate: true
|
|
954
|
+
commit: (input) => commitSession(input, { activate: true }),
|
|
971
955
|
username: opts?.username,
|
|
972
956
|
deviceId: persisted?.deviceId,
|
|
973
957
|
deviceName: opts?.deviceName,
|
|
@@ -985,7 +969,7 @@ export const OxyProvider: React.FC<OxyContextProviderProps> = ({
|
|
|
985
969
|
getRegisterOptions: (username) => oxyServices.webauthnRegisterOptions(username),
|
|
986
970
|
runCeremony: runRegistrationCeremony,
|
|
987
971
|
registerVerify: (response, envelope) => oxyServices.webauthnRegisterVerify(response, envelope),
|
|
988
|
-
commit: (input) => commitSession(input, { activate: true
|
|
972
|
+
commit: (input) => commitSession(input, { activate: true }),
|
|
989
973
|
username: params.username,
|
|
990
974
|
deviceName: params.deviceName,
|
|
991
975
|
});
|
|
@@ -1037,13 +1021,8 @@ export const OxyProvider: React.FC<OxyContextProviderProps> = ({
|
|
|
1037
1021
|
authStore,
|
|
1038
1022
|
clientId: clientIdProp,
|
|
1039
1023
|
authRedirectUri,
|
|
1040
|
-
authorizeBaseUrl,
|
|
1041
1024
|
sessionMode,
|
|
1042
1025
|
identity: identity?.binding,
|
|
1043
|
-
// Popup mode forbids the boot's automatic full-page `prompt=none` restore:
|
|
1044
|
-
// a domain with no local credential resolves signed out instead of
|
|
1045
|
-
// navigating the tab to the IdP (see `allowsAutomaticIdpRedirect`).
|
|
1046
|
-
webAuthMode,
|
|
1047
1026
|
sessionClient,
|
|
1048
1027
|
syncDeviceCredentialToHost,
|
|
1049
1028
|
commitSession: (input, options) => commitSessionRef.current(input, options),
|
|
@@ -1061,10 +1040,8 @@ export const OxyProvider: React.FC<OxyContextProviderProps> = ({
|
|
|
1061
1040
|
authStore,
|
|
1062
1041
|
clientIdProp,
|
|
1063
1042
|
authRedirectUri,
|
|
1064
|
-
authorizeBaseUrl,
|
|
1065
1043
|
sessionMode,
|
|
1066
1044
|
identity,
|
|
1067
|
-
webAuthMode,
|
|
1068
1045
|
syncDeviceCredentialToHost,
|
|
1069
1046
|
sessionClient,
|
|
1070
1047
|
]);
|
|
@@ -1220,6 +1197,18 @@ export const OxyProvider: React.FC<OxyContextProviderProps> = ({
|
|
|
1220
1197
|
const canUsePrivateApi = authResolved && isAuthenticated && tokenReady && hasAccessToken;
|
|
1221
1198
|
const isPrivateApiPending = !authResolved || (isAuthenticated && (!tokenReady || !hasAccessToken));
|
|
1222
1199
|
|
|
1200
|
+
// Keep the native background credential in step with this session, so native
|
|
1201
|
+
// background code (a widget worker) can authenticate with no JS runtime. Inert
|
|
1202
|
+
// unless the app opted in. Placed AFTER `canUsePrivateApi` because provisioning
|
|
1203
|
+
// needs a bearer, and keyed on the signed-in account so a sign-out or an
|
|
1204
|
+
// account switch revokes the credential before anything else happens.
|
|
1205
|
+
useBackgroundSessionSync({
|
|
1206
|
+
enabled: backgroundSession,
|
|
1207
|
+
oxyServices,
|
|
1208
|
+
userId: user?.id ?? null,
|
|
1209
|
+
canUsePrivateApi,
|
|
1210
|
+
});
|
|
1211
|
+
|
|
1223
1212
|
const contextValue: OxyContextState = useMemo(
|
|
1224
1213
|
() => ({
|
|
1225
1214
|
user,
|
|
@@ -1366,7 +1355,7 @@ const LOADING_STATE: OxyContextState = {
|
|
|
1366
1355
|
isAuthResolved: false,
|
|
1367
1356
|
isStorageReady: false,
|
|
1368
1357
|
sessionMode: 'account',
|
|
1369
|
-
webAuthMode: '
|
|
1358
|
+
webAuthMode: 'popup',
|
|
1370
1359
|
error: null,
|
|
1371
1360
|
currentLanguage: 'en-US',
|
|
1372
1361
|
currentLanguages: [],
|