@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
|
@@ -9,7 +9,6 @@ import { OXY_OAUTH_CODE_MESSAGE_TYPE, OXY_OAUTH_ERROR_MESSAGE_TYPE } from '../oa
|
|
|
9
9
|
import type { OAuthPopupHandle, OAuthPopupOutcome } from '../types';
|
|
10
10
|
|
|
11
11
|
const IDP_ORIGIN = 'https://auth.oxy.so';
|
|
12
|
-
const REDIRECT_URI = 'https://mention.earth';
|
|
13
12
|
const STATE = 'state-abc';
|
|
14
13
|
|
|
15
14
|
interface ControllablePopup extends OAuthPopupHandle {
|
|
@@ -162,7 +161,6 @@ describe('awaitOAuthPopupResult', () => {
|
|
|
162
161
|
popup,
|
|
163
162
|
expectedOrigin: IDP_ORIGIN,
|
|
164
163
|
expectedState: STATE,
|
|
165
|
-
redirectUri: REDIRECT_URI,
|
|
166
164
|
});
|
|
167
165
|
|
|
168
166
|
dispatchMessage(codeMessage(popup));
|
|
@@ -177,7 +175,6 @@ describe('awaitOAuthPopupResult', () => {
|
|
|
177
175
|
popup,
|
|
178
176
|
expectedOrigin: IDP_ORIGIN,
|
|
179
177
|
expectedState: STATE,
|
|
180
|
-
redirectUri: REDIRECT_URI,
|
|
181
178
|
});
|
|
182
179
|
|
|
183
180
|
dispatchMessage({
|
|
@@ -205,7 +202,6 @@ describe('awaitOAuthPopupResult', () => {
|
|
|
205
202
|
popup,
|
|
206
203
|
expectedOrigin: IDP_ORIGIN,
|
|
207
204
|
expectedState: STATE,
|
|
208
|
-
redirectUri: REDIRECT_URI,
|
|
209
205
|
});
|
|
210
206
|
|
|
211
207
|
dispatchMessage(codeMessage(popup, 'a-different-state'));
|
|
@@ -223,7 +219,6 @@ describe('awaitOAuthPopupResult', () => {
|
|
|
223
219
|
popup,
|
|
224
220
|
expectedOrigin: IDP_ORIGIN,
|
|
225
221
|
expectedState: STATE,
|
|
226
|
-
redirectUri: REDIRECT_URI,
|
|
227
222
|
timeoutMs: 60_000,
|
|
228
223
|
});
|
|
229
224
|
|
|
@@ -242,7 +237,6 @@ describe('awaitOAuthPopupResult', () => {
|
|
|
242
237
|
popup,
|
|
243
238
|
expectedOrigin: IDP_ORIGIN,
|
|
244
239
|
expectedState: STATE,
|
|
245
|
-
redirectUri: REDIRECT_URI,
|
|
246
240
|
timeoutMs: 60_000,
|
|
247
241
|
});
|
|
248
242
|
|
|
@@ -260,7 +254,6 @@ describe('awaitOAuthPopupResult', () => {
|
|
|
260
254
|
popup,
|
|
261
255
|
expectedOrigin: IDP_ORIGIN,
|
|
262
256
|
expectedState: STATE,
|
|
263
|
-
redirectUri: REDIRECT_URI,
|
|
264
257
|
});
|
|
265
258
|
|
|
266
259
|
dispatchMessage(codeMessage(popup));
|
|
@@ -284,7 +277,6 @@ describe('awaitOAuthPopupResult', () => {
|
|
|
284
277
|
popup,
|
|
285
278
|
expectedOrigin: IDP_ORIGIN,
|
|
286
279
|
expectedState: STATE,
|
|
287
|
-
redirectUri: REDIRECT_URI,
|
|
288
280
|
});
|
|
289
281
|
|
|
290
282
|
popup.setClosed();
|
|
@@ -303,7 +295,6 @@ describe('awaitOAuthPopupResult', () => {
|
|
|
303
295
|
popup,
|
|
304
296
|
expectedOrigin: IDP_ORIGIN,
|
|
305
297
|
expectedState: STATE,
|
|
306
|
-
redirectUri: REDIRECT_URI,
|
|
307
298
|
});
|
|
308
299
|
|
|
309
300
|
// The IdP posts its result and immediately closes itself.
|
|
@@ -322,7 +313,6 @@ describe('awaitOAuthPopupResult', () => {
|
|
|
322
313
|
popup,
|
|
323
314
|
expectedOrigin: IDP_ORIGIN,
|
|
324
315
|
expectedState: STATE,
|
|
325
|
-
redirectUri: REDIRECT_URI,
|
|
326
316
|
timeoutMs: 30_000,
|
|
327
317
|
});
|
|
328
318
|
|
|
@@ -333,20 +323,4 @@ describe('awaitOAuthPopupResult', () => {
|
|
|
333
323
|
await expect(promise).resolves.toEqual({ kind: 'timed-out' });
|
|
334
324
|
expectFullCleanup();
|
|
335
325
|
});
|
|
336
|
-
|
|
337
|
-
it('reads a same-origin redirect fallback from the popup URL when postMessage is unavailable', async () => {
|
|
338
|
-
const popup = fakePopup();
|
|
339
|
-
popup.location.href = `${REDIRECT_URI}?code=auth-code&state=${STATE}`;
|
|
340
|
-
const promise = awaitOAuthPopupResult({
|
|
341
|
-
popup,
|
|
342
|
-
expectedOrigin: IDP_ORIGIN,
|
|
343
|
-
expectedState: STATE,
|
|
344
|
-
redirectUri: REDIRECT_URI,
|
|
345
|
-
});
|
|
346
|
-
|
|
347
|
-
jest.advanceTimersByTime(1000);
|
|
348
|
-
|
|
349
|
-
await expect(promise).resolves.toEqual({ kind: 'code', code: 'auth-code', state: STATE });
|
|
350
|
-
expectFullCleanup();
|
|
351
|
-
});
|
|
352
326
|
});
|
|
@@ -102,60 +102,58 @@ export async function startWebOAuthSignIn(
|
|
|
102
102
|
return startRedirectSignIn(context, options, 'popup-blocked');
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
});
|
|
105
|
+
const prepared = await prepareAuthorizeRequest({
|
|
106
|
+
clientId: context.clientId,
|
|
107
|
+
redirectUri: options.redirectUri,
|
|
108
|
+
authorizeBaseUrl: context.authorizeBaseUrl,
|
|
109
|
+
scope: options.scope,
|
|
110
|
+
responseMode: 'web_message',
|
|
111
|
+
});
|
|
113
112
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
113
|
+
if (!navigateOAuthPopup(popup, prepared.authorizeUrl)) {
|
|
114
|
+
closeOAuthPopup(popup);
|
|
115
|
+
return startRedirectSignIn(context, options, 'popup-navigation-failed');
|
|
116
|
+
}
|
|
117
117
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
118
|
+
const outcome = await awaitOAuthPopupResult({
|
|
119
|
+
popup,
|
|
120
|
+
expectedOrigin: prepared.authorizeOrigin,
|
|
121
|
+
expectedState: prepared.handshake.state,
|
|
122
|
+
...(options.timeoutMs !== undefined ? { timeoutMs: options.timeoutMs } : {}),
|
|
123
|
+
});
|
|
124
|
+
// The IdP closes itself after delivering; this covers every other outcome
|
|
125
|
+
// (timeout, mismatch, an error the IdP reported before closing).
|
|
126
|
+
closeOAuthPopup(popup);
|
|
125
127
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
}
|
|
141
|
-
case 'oauth-error':
|
|
142
|
-
return {
|
|
143
|
-
status: 'failed',
|
|
144
|
-
reason: 'idp-error',
|
|
145
|
-
description: outcome.errorDescription ?? outcome.error,
|
|
146
|
-
};
|
|
147
|
-
case 'state-mismatch':
|
|
148
|
-
return { status: 'failed', reason: 'state-mismatch' };
|
|
149
|
-
case 'closed':
|
|
150
|
-
return { status: 'cancelled' };
|
|
151
|
-
case 'timed-out':
|
|
152
|
-
return { status: 'timed-out' };
|
|
153
|
-
case 'unsupported':
|
|
154
|
-
return { status: 'unsupported', reason: 'no-browser' };
|
|
128
|
+
switch (outcome.kind) {
|
|
129
|
+
case 'code': {
|
|
130
|
+
const completion = await completeOAuthCode({
|
|
131
|
+
oxyServices: context.oxyServices,
|
|
132
|
+
clientId: context.clientId,
|
|
133
|
+
code: outcome.code,
|
|
134
|
+
returnedState: outcome.state,
|
|
135
|
+
handshake: prepared.handshake,
|
|
136
|
+
redirectUri: options.redirectUri,
|
|
137
|
+
commitSession: context.commitSession,
|
|
138
|
+
});
|
|
139
|
+
return completion.ok
|
|
140
|
+
? { status: 'signed-in' }
|
|
141
|
+
: { status: 'failed', reason: completion.reason };
|
|
155
142
|
}
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
143
|
+
case 'oauth-error':
|
|
144
|
+
return {
|
|
145
|
+
status: 'failed',
|
|
146
|
+
reason: 'idp-error',
|
|
147
|
+
description: outcome.errorDescription ?? outcome.error,
|
|
148
|
+
};
|
|
149
|
+
case 'state-mismatch':
|
|
150
|
+
return { status: 'failed', reason: 'state-mismatch' };
|
|
151
|
+
case 'closed':
|
|
152
|
+
return { status: 'cancelled' };
|
|
153
|
+
case 'timed-out':
|
|
154
|
+
return { status: 'timed-out' };
|
|
155
|
+
case 'unsupported':
|
|
156
|
+
return { status: 'unsupported', reason: 'no-browser' };
|
|
159
157
|
}
|
|
160
158
|
}
|
|
161
159
|
|
|
@@ -180,11 +178,7 @@ async function startRedirectSignIn(
|
|
|
180
178
|
scope: options.scope,
|
|
181
179
|
});
|
|
182
180
|
|
|
183
|
-
if (!persistOAuthHandshake(
|
|
184
|
-
prepared.handshake.state,
|
|
185
|
-
prepared.handshake.codeVerifier,
|
|
186
|
-
options.redirectUri,
|
|
187
|
-
)) {
|
|
181
|
+
if (!persistOAuthHandshake(prepared.handshake.state, prepared.handshake.codeVerifier)) {
|
|
188
182
|
return { status: 'failed', reason: 'handshake-storage' };
|
|
189
183
|
}
|
|
190
184
|
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The legacy, redirect-mode-only lanes that navigate the RP's TOP-LEVEL window
|
|
3
|
+
* to the IdP without a user gesture.
|
|
4
|
+
*
|
|
5
|
+
* `webAuthMode: 'popup'` exists to guarantee exactly one thing: the relying
|
|
6
|
+
* party never leaves its route. Two mechanics in this SDK break that guarantee,
|
|
7
|
+
* because each replaces the whole document on its own initiative:
|
|
8
|
+
*
|
|
9
|
+
* 1. **Cold-boot silent restore** — a full-page `prompt=none` authorize bounce
|
|
10
|
+
* to `auth.oxy.so` when the device-secret mint finds no local session
|
|
11
|
+
* (`maybeStartSilentOAuthRestore`, called from `runProviderColdBoot`).
|
|
12
|
+
* 2. **Post-sign-in hub sync** — a full-page hop to `auth.oxy.so/sync` that
|
|
13
|
+
* plants this device's credential on the IdP hub so OTHER origins can later
|
|
14
|
+
* run lane 1 (`syncHubAfterSignIn`, called from the `commitSession` funnel).
|
|
15
|
+
*
|
|
16
|
+
* Both belong to the redirect transport and are kept only for the migration
|
|
17
|
+
* window (issue #691, "Cold boot and cross-domain behavior"). In popup mode a
|
|
18
|
+
* domain with no local credential simply resolves SIGNED OUT, and the user's
|
|
19
|
+
* next explicit "Continue with Oxy" opens the popup — from a real user gesture,
|
|
20
|
+
* never automatically.
|
|
21
|
+
*
|
|
22
|
+
* NOT covered here, and correctly enabled in BOTH modes: navigations the user
|
|
23
|
+
* asked for. When the browser blocks the popup, `startWebOAuthSignIn` still
|
|
24
|
+
* falls back to a full-page redirect rather than dead-ending the sign-in, and
|
|
25
|
+
* `tryCompleteOAuthReturn` still consumes a `?code=` that is already on the URL.
|
|
26
|
+
*
|
|
27
|
+
* PHASE 7b: once the pilot flips the default transport to `'popup'`, this
|
|
28
|
+
* predicate and BOTH lanes above are deleted outright. Grepping this symbol
|
|
29
|
+
* finds every site that has to go.
|
|
30
|
+
*/
|
|
31
|
+
|
|
32
|
+
import type { WebAuthMode } from './types';
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Whether a provider running `webAuthMode` may perform an SDK-initiated,
|
|
36
|
+
* non-gesture, full-page navigation to the IdP.
|
|
37
|
+
*
|
|
38
|
+
* `true` only for `'redirect'` — still the default and the compatibility path,
|
|
39
|
+
* whose behaviour must stay byte-for-byte unchanged.
|
|
40
|
+
*/
|
|
41
|
+
export function allowsAutomaticIdpRedirect(webAuthMode: WebAuthMode): boolean {
|
|
42
|
+
return webAuthMode === 'redirect';
|
|
43
|
+
}
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* opaque. The authorization result arrives ONLY as a `postMessage`.
|
|
20
20
|
*/
|
|
21
21
|
|
|
22
|
-
import {
|
|
22
|
+
import { logger } from '@oxyhq/core';
|
|
23
23
|
import { readOAuthPopupMessage } from './oauthPopupMessages';
|
|
24
24
|
import type { OAuthPopupHandle, OAuthPopupOutcome } from './types';
|
|
25
25
|
|
|
@@ -119,47 +119,6 @@ export function closeOAuthPopup(popup: OAuthPopupHandle | null): void {
|
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
121
|
|
|
122
|
-
/**
|
|
123
|
-
* When the IdP falls back to a top-level redirect inside the popup (no usable
|
|
124
|
-
* `window.opener`), a same-origin `redirect_uri` is readable from the opener.
|
|
125
|
-
* Cross-origin redirects remain opaque and are not handled here.
|
|
126
|
-
*/
|
|
127
|
-
function readSameOriginRedirectOutcome(
|
|
128
|
-
popup: OAuthPopupHandle,
|
|
129
|
-
redirectUri: string,
|
|
130
|
-
expectedState: string,
|
|
131
|
-
): OAuthPopupOutcome | null {
|
|
132
|
-
try {
|
|
133
|
-
const href = popup.location.href;
|
|
134
|
-
if (!href) return null;
|
|
135
|
-
|
|
136
|
-
const popupUrl = new URL(href);
|
|
137
|
-
const expected = new URL(canonicalizeOAuthRedirectUri(redirectUri));
|
|
138
|
-
if (popupUrl.origin !== expected.origin) return null;
|
|
139
|
-
if (popupUrl.pathname !== expected.pathname) return null;
|
|
140
|
-
|
|
141
|
-
const oauthError = popupUrl.searchParams.get('error');
|
|
142
|
-
if (oauthError) {
|
|
143
|
-
const errorDescription = popupUrl.searchParams.get('error_description') ?? undefined;
|
|
144
|
-
return {
|
|
145
|
-
kind: 'oauth-error',
|
|
146
|
-
error: oauthError,
|
|
147
|
-
...(errorDescription ? { errorDescription } : {}),
|
|
148
|
-
};
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
const code = popupUrl.searchParams.get('code');
|
|
152
|
-
if (!code) return null;
|
|
153
|
-
|
|
154
|
-
const state = popupUrl.searchParams.get('state');
|
|
155
|
-
if (!state || state !== expectedState) return { kind: 'state-mismatch' };
|
|
156
|
-
return { kind: 'code', code, state };
|
|
157
|
-
} catch {
|
|
158
|
-
// Cross-origin navigation — the popup URL is opaque to the opener.
|
|
159
|
-
return null;
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
|
|
163
122
|
/** Inputs for {@link awaitOAuthPopupResult}. */
|
|
164
123
|
export interface AwaitOAuthPopupOptions {
|
|
165
124
|
/** The exact window reference returned by {@link openOAuthPopup}. */
|
|
@@ -168,12 +127,6 @@ export interface AwaitOAuthPopupOptions {
|
|
|
168
127
|
expectedOrigin: string;
|
|
169
128
|
/** The CSRF `state` sent on the authorize request. */
|
|
170
129
|
expectedState: string;
|
|
171
|
-
/**
|
|
172
|
-
* EXACT registered redirect URI for this attempt. When the IdP cannot
|
|
173
|
-
* `postMessage` (no usable opener) it falls back to redirecting the popup;
|
|
174
|
-
* if that lands on the same origin, the result is read from the popup URL.
|
|
175
|
-
*/
|
|
176
|
-
redirectUri: string;
|
|
177
130
|
/** @default DEFAULT_OAUTH_POPUP_TIMEOUT_MS */
|
|
178
131
|
timeoutMs?: number;
|
|
179
132
|
}
|
|
@@ -192,13 +145,8 @@ export interface AwaitOAuthPopupOptions {
|
|
|
192
145
|
export function awaitOAuthPopupResult(
|
|
193
146
|
options: AwaitOAuthPopupOptions,
|
|
194
147
|
): Promise<OAuthPopupOutcome> {
|
|
195
|
-
const {
|
|
196
|
-
|
|
197
|
-
expectedOrigin,
|
|
198
|
-
expectedState,
|
|
199
|
-
redirectUri,
|
|
200
|
-
timeoutMs = DEFAULT_OAUTH_POPUP_TIMEOUT_MS,
|
|
201
|
-
} = options;
|
|
148
|
+
const { popup, expectedOrigin, expectedState, timeoutMs = DEFAULT_OAUTH_POPUP_TIMEOUT_MS } =
|
|
149
|
+
options;
|
|
202
150
|
|
|
203
151
|
const host = messageEventHost();
|
|
204
152
|
if (!host) return Promise.resolve({ kind: 'unsupported' });
|
|
@@ -258,12 +206,6 @@ export function awaitOAuthPopupResult(
|
|
|
258
206
|
timeoutTimer = setTimeout(() => settle({ kind: 'timed-out' }), timeoutMs);
|
|
259
207
|
|
|
260
208
|
closePoll = setInterval(() => {
|
|
261
|
-
const redirectOutcome = readSameOriginRedirectOutcome(popup, redirectUri, expectedState);
|
|
262
|
-
if (redirectOutcome) {
|
|
263
|
-
settle(redirectOutcome);
|
|
264
|
-
return;
|
|
265
|
-
}
|
|
266
|
-
|
|
267
209
|
if (!popup.closed) return;
|
|
268
210
|
// Stop sampling immediately: the window is gone and only the in-flight
|
|
269
211
|
// message (if any) can still change the outcome.
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
} from 'react-native';
|
|
8
8
|
import Ionicons from '@expo/vector-icons/Ionicons';
|
|
9
9
|
import { useQuery, useMutation, useQueryClient } from '@tanstack/react-query';
|
|
10
|
-
import { toast } from '@oxyhq/bloom
|
|
10
|
+
import { toast } from '@oxyhq/bloom';
|
|
11
11
|
import { surfaces } from '@oxyhq/bloom/surfaces';
|
|
12
12
|
import { useTheme } from '@oxyhq/bloom/theme';
|
|
13
13
|
import { Text } from '@oxyhq/bloom/typography';
|
|
@@ -5,21 +5,21 @@ import {
|
|
|
5
5
|
ActivityIndicator,
|
|
6
6
|
} from 'react-native';
|
|
7
7
|
import { useQuery, useMutation, useQueryClient } from '@tanstack/react-query';
|
|
8
|
-
import { toast } from '@oxyhq/bloom
|
|
8
|
+
import { toast } from '@oxyhq/bloom';
|
|
9
9
|
import { surfaces } from '@oxyhq/bloom/surfaces';
|
|
10
10
|
import { useTheme } from '@oxyhq/bloom/theme';
|
|
11
11
|
import { Text } from '@oxyhq/bloom/typography';
|
|
12
12
|
import { Button } from '@oxyhq/bloom/button';
|
|
13
13
|
import { TextField, TextFieldInput } from '@oxyhq/bloom/text-field';
|
|
14
14
|
import { SettingsListGroup, SettingsListItem } from '@oxyhq/bloom/settings-list';
|
|
15
|
-
import {
|
|
15
|
+
import type { UpdateAccountInput } from '@oxyhq/core';
|
|
16
16
|
import type { BaseScreenProps } from '../types/navigation';
|
|
17
17
|
import { SettingsIcon } from '../components/SettingsIcon';
|
|
18
18
|
import { useOxy } from '../context/OxyContext';
|
|
19
19
|
import { useI18n } from '../hooks/useI18n';
|
|
20
20
|
import { useSurfaceHeader } from '../hooks/useSurfaceHeader';
|
|
21
21
|
|
|
22
|
-
const DISPLAY_NAME_MAX =
|
|
22
|
+
const DISPLAY_NAME_MAX = 50;
|
|
23
23
|
const BIO_MAX = 160;
|
|
24
24
|
|
|
25
25
|
const errorMessage = (error: unknown, fallback: string): string =>
|
|
@@ -62,15 +62,14 @@ const AccountSettingsScreen: React.FC<BaseScreenProps> = ({ onClose, goBack, nav
|
|
|
62
62
|
// Editable fields, seeded lazily from the loaded account once.
|
|
63
63
|
const [seeded, setSeeded] = useState(false);
|
|
64
64
|
const [displayName, setDisplayName] = useState('');
|
|
65
|
-
const [displayNameError, setDisplayNameError] = useState('');
|
|
66
65
|
const [bio, setBio] = useState('');
|
|
67
66
|
|
|
68
67
|
// Seed the form from the account during render (no useEffect): the first time
|
|
69
68
|
// the query resolves we capture its values into local edit state.
|
|
70
69
|
if (node && !seeded) {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
);
|
|
70
|
+
const first = node.account?.name?.first ?? '';
|
|
71
|
+
const last = node.account?.name?.last ?? '';
|
|
72
|
+
setDisplayName([first, last].filter(Boolean).join(' '));
|
|
74
73
|
setBio(node.account?.bio ?? '');
|
|
75
74
|
setSeeded(true);
|
|
76
75
|
}
|
|
@@ -122,27 +121,8 @@ const AccountSettingsScreen: React.FC<BaseScreenProps> = ({ onClose, goBack, nav
|
|
|
122
121
|
if (confirmed) archiveMutation.mutate();
|
|
123
122
|
}, [archiveMutation, t]);
|
|
124
123
|
|
|
125
|
-
const handleDisplayNameChange = useCallback((value: string) => {
|
|
126
|
-
setDisplayName(value);
|
|
127
|
-
const trimmed = value.trim();
|
|
128
|
-
if (!trimmed) {
|
|
129
|
-
setDisplayNameError('');
|
|
130
|
-
return;
|
|
131
|
-
}
|
|
132
|
-
const nameParts = trimmed.split(/\s+/).filter(Boolean);
|
|
133
|
-
const first = nameParts[0] || '';
|
|
134
|
-
const last = nameParts.length > 1 ? nameParts.slice(1).join(' ') : '';
|
|
135
|
-
const invalidPart = [first, last].find((part) => part && !isValidDisplayName(part));
|
|
136
|
-
setDisplayNameError(
|
|
137
|
-
invalidPart
|
|
138
|
-
? (t('accounts.settings.displayName.invalidChars') || DISPLAY_NAME_INVALID_MESSAGE)
|
|
139
|
-
: '',
|
|
140
|
-
);
|
|
141
|
-
}, [t]);
|
|
142
|
-
|
|
143
124
|
const handleSave = useCallback(() => {
|
|
144
125
|
const trimmed = displayName.trim();
|
|
145
|
-
if (!trimmed || displayNameError) return;
|
|
146
126
|
const nameParts = trimmed.split(/\s+/).filter(Boolean);
|
|
147
127
|
const first = nameParts[0] || '';
|
|
148
128
|
const last = nameParts.length > 1 ? nameParts.slice(1).join(' ') : undefined;
|
|
@@ -150,7 +130,7 @@ const AccountSettingsScreen: React.FC<BaseScreenProps> = ({ onClose, goBack, nav
|
|
|
150
130
|
name: { first, last },
|
|
151
131
|
bio: bio.trim() ? bio.trim() : null,
|
|
152
132
|
});
|
|
153
|
-
}, [displayName,
|
|
133
|
+
}, [displayName, bio, updateMutation]);
|
|
154
134
|
|
|
155
135
|
const title = t('accounts.settings.title') || 'Account settings';
|
|
156
136
|
|
|
@@ -191,23 +171,15 @@ const AccountSettingsScreen: React.FC<BaseScreenProps> = ({ onClose, goBack, nav
|
|
|
191
171
|
{/* Profile edit */}
|
|
192
172
|
{canUpdate ? (
|
|
193
173
|
<View className="gap-space-16 p-space-16 rounded-radius-20 bg-fill">
|
|
194
|
-
<
|
|
195
|
-
<
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
/>
|
|
204
|
-
</TextField>
|
|
205
|
-
{displayNameError ? (
|
|
206
|
-
<Text className="text-caption font-caption text-negative px-space-4">
|
|
207
|
-
{displayNameError}
|
|
208
|
-
</Text>
|
|
209
|
-
) : null}
|
|
210
|
-
</View>
|
|
174
|
+
<TextField>
|
|
175
|
+
<TextFieldInput
|
|
176
|
+
floatingLabel
|
|
177
|
+
label={t('accounts.settings.displayName.label') || 'Display name'}
|
|
178
|
+
value={displayName}
|
|
179
|
+
onChangeText={setDisplayName}
|
|
180
|
+
maxLength={DISPLAY_NAME_MAX}
|
|
181
|
+
/>
|
|
182
|
+
</TextField>
|
|
211
183
|
<View className="gap-space-4">
|
|
212
184
|
<TextField>
|
|
213
185
|
<TextFieldInput
|
|
@@ -228,7 +200,7 @@ const AccountSettingsScreen: React.FC<BaseScreenProps> = ({ onClose, goBack, nav
|
|
|
228
200
|
<Button
|
|
229
201
|
variant="primary"
|
|
230
202
|
onPress={handleSave}
|
|
231
|
-
disabled={updateMutation.isPending || !displayName.trim()
|
|
203
|
+
disabled={updateMutation.isPending || !displayName.trim()}
|
|
232
204
|
loading={updateMutation.isPending}
|
|
233
205
|
accessibilityLabel={t('accounts.settings.save') || 'Save changes'}
|
|
234
206
|
className="w-full"
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
StyleSheet,
|
|
5
5
|
} from 'react-native';
|
|
6
6
|
import type { BaseScreenProps } from '../types/navigation';
|
|
7
|
-
import { toast } from '@oxyhq/bloom
|
|
7
|
+
import { toast } from '@oxyhq/bloom';
|
|
8
8
|
import { surfaces } from '@oxyhq/bloom/surfaces';
|
|
9
9
|
import { useTheme } from '@oxyhq/bloom/theme';
|
|
10
10
|
import { H4, Text } from '@oxyhq/bloom/typography';
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from 'react-native';
|
|
10
10
|
import type { BaseScreenProps } from '../types/navigation';
|
|
11
11
|
import { packageInfo } from '@oxyhq/core';
|
|
12
|
-
import { toast } from '@oxyhq/bloom
|
|
12
|
+
import { toast } from '@oxyhq/bloom';
|
|
13
13
|
import OxyServicesLogo from '../../assets/icons/OxyServices';
|
|
14
14
|
import { SettingsIcon } from '../components/SettingsIcon';
|
|
15
15
|
import { useTheme } from '@oxyhq/bloom/theme';
|
|
@@ -55,7 +55,7 @@ import { useOxy } from '../context/OxyContext';
|
|
|
55
55
|
import { useI18n } from '../hooks/useI18n';
|
|
56
56
|
import { useReduceMotion } from '../hooks/useReduceMotion';
|
|
57
57
|
import { useSurfaceHeader, type SurfaceHeaderContent } from '../hooks/useSurfaceHeader';
|
|
58
|
-
import { toast } from '@oxyhq/bloom
|
|
58
|
+
import { toast } from '@oxyhq/bloom';
|
|
59
59
|
import type { BaseScreenProps } from '../types/navigation';
|
|
60
60
|
|
|
61
61
|
/** Component name used in `logger` context for filtered diagnostics. */
|
|
@@ -39,8 +39,8 @@ import {
|
|
|
39
39
|
} from '@oxyhq/bloom/admonition';
|
|
40
40
|
import { surfaces as bloomSurfaces } from '@oxyhq/bloom/surfaces';
|
|
41
41
|
import { useTheme } from '@oxyhq/bloom/theme';
|
|
42
|
-
import { toast } from '@oxyhq/bloom
|
|
43
|
-
import {
|
|
42
|
+
import { toast } from '@oxyhq/bloom';
|
|
43
|
+
import { getAccountDisplayName, logger } from '@oxyhq/core';
|
|
44
44
|
import type { FileMetadata } from '@oxyhq/core';
|
|
45
45
|
import { useOxy } from '../context/OxyContext';
|
|
46
46
|
import { useI18n } from '../hooks/useI18n';
|
|
@@ -133,7 +133,7 @@ async function loadImagePicker(): Promise<ImagePickerModule | null> {
|
|
|
133
133
|
|
|
134
134
|
const ChangeAvatarScreen: React.FC<BaseScreenProps> = ({ navigate, dismiss }) => {
|
|
135
135
|
const bloomTheme = useTheme();
|
|
136
|
-
const { t } = useI18n();
|
|
136
|
+
const { t, locale } = useI18n();
|
|
137
137
|
const { user, oxyServices } = useOxy();
|
|
138
138
|
|
|
139
139
|
/** Set when a permission was refused — drives the inline denied notice. */
|
|
@@ -143,10 +143,7 @@ const ChangeAvatarScreen: React.FC<BaseScreenProps> = ({ navigate, dismiss }) =>
|
|
|
143
143
|
|
|
144
144
|
useSurfaceHeader(useMemo(() => ({ title: t('changeAvatar.title') }), [t]));
|
|
145
145
|
|
|
146
|
-
const displayName = useMemo(
|
|
147
|
-
() => user?.name?.displayName ?? getNormalizedUserHandle(user) ?? '',
|
|
148
|
-
[user],
|
|
149
|
-
);
|
|
146
|
+
const displayName = useMemo(() => getAccountDisplayName(user, locale), [user, locale]);
|
|
150
147
|
const avatarUri = useMemo(
|
|
151
148
|
// `thumb` is 256x256 — exactly a 2x source for the 132dp hero.
|
|
152
149
|
() => (user?.avatar ? oxyServices.getFileDownloadUrl(user.avatar, 'thumb') : undefined),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useCallback, useState } from 'react';
|
|
2
2
|
import { ActivityIndicator, FlatList, RefreshControl, StyleSheet, View } from 'react-native';
|
|
3
|
-
import { toast } from '@oxyhq/bloom
|
|
3
|
+
import { toast } from '@oxyhq/bloom';
|
|
4
4
|
import { surfaces } from '@oxyhq/bloom/surfaces';
|
|
5
5
|
import { useTheme } from '@oxyhq/bloom/theme';
|
|
6
6
|
import { SettingsListGroup, SettingsListItem } from '@oxyhq/bloom/settings-list';
|
|
@@ -108,7 +108,7 @@ const ConnectedAppsScreen: React.FC<BaseScreenProps> = ({ onClose, goBack }) =>
|
|
|
108
108
|
</Text>
|
|
109
109
|
</View>
|
|
110
110
|
),
|
|
111
|
-
[t],
|
|
111
|
+
[t, bloomTheme.colors.textSecondary],
|
|
112
112
|
);
|
|
113
113
|
|
|
114
114
|
const renderItem = useCallback(
|