@oxyhq/services 22.12.4 → 22.12.7
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 +16 -46
- package/lib/commonjs/index.js +84 -10
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/notifications/deviceNotifications.js +380 -0
- package/lib/commonjs/notifications/deviceNotifications.js.map +1 -0
- package/lib/commonjs/ui/boot/runProviderColdBoot.js +51 -9
- package/lib/commonjs/ui/boot/runProviderColdBoot.js.map +1 -1
- package/lib/commonjs/ui/client.js +0 -13
- package/lib/commonjs/ui/client.js.map +1 -1
- package/lib/commonjs/ui/components/AvatarCameraBadge.js +3 -2
- package/lib/commonjs/ui/components/AvatarCameraBadge.js.map +1 -1
- package/lib/commonjs/ui/components/OxyAccountDialogScreen.js +14 -3
- package/lib/commonjs/ui/components/OxyAccountDialogScreen.js.map +1 -1
- package/lib/commonjs/ui/components/OxyAuthChooser.js +70 -1121
- package/lib/commonjs/ui/components/OxyAuthChooser.js.map +1 -1
- package/lib/commonjs/ui/components/OxyConsentScreen.js +50 -12
- package/lib/commonjs/ui/components/OxyConsentScreen.js.map +1 -1
- package/lib/commonjs/ui/components/OxyProvider.js +4 -4
- package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
- package/lib/commonjs/ui/components/OxySignInButton.js +74 -40
- package/lib/commonjs/ui/components/OxySignInButton.js.map +1 -1
- package/lib/commonjs/ui/components/OxySignInRequestSurface.js +147 -0
- package/lib/commonjs/ui/components/OxySignInRequestSurface.js.map +1 -0
- package/lib/commonjs/ui/components/ProfileButton.js +4 -3
- package/lib/commonjs/ui/components/ProfileButton.js.map +1 -1
- package/lib/commonjs/ui/components/SettingsIcon.js +3 -2
- package/lib/commonjs/ui/components/SettingsIcon.js.map +1 -1
- package/lib/commonjs/ui/components/authChooser/AccountsMenuView.js +527 -0
- package/lib/commonjs/ui/components/authChooser/AccountsMenuView.js.map +1 -0
- package/lib/commonjs/ui/components/authChooser/SignInEntryView.js +90 -0
- package/lib/commonjs/ui/components/authChooser/SignInEntryView.js.map +1 -0
- package/lib/commonjs/ui/components/authChooser/SignInRequestView.js +106 -0
- package/lib/commonjs/ui/components/authChooser/SignInRequestView.js.map +1 -0
- package/lib/commonjs/ui/components/authChooser/SignUpView.js +188 -0
- package/lib/commonjs/ui/components/authChooser/SignUpView.js.map +1 -0
- package/lib/commonjs/ui/components/authChooser/TroubleDisclosure.js +61 -0
- package/lib/commonjs/ui/components/authChooser/TroubleDisclosure.js.map +1 -0
- package/lib/commonjs/ui/components/authChooser/primitives.js +170 -0
- package/lib/commonjs/ui/components/authChooser/primitives.js.map +1 -0
- package/lib/commonjs/ui/components/authChooser/requestSurfaces.js +153 -0
- package/lib/commonjs/ui/components/authChooser/requestSurfaces.js.map +1 -0
- package/lib/commonjs/ui/components/authChooser/signInProgress.js +54 -0
- package/lib/commonjs/ui/components/authChooser/signInProgress.js.map +1 -0
- package/lib/commonjs/ui/components/{oxyAuthChooserStyles.js → authChooser/styles.js} +19 -1
- package/lib/commonjs/ui/components/authChooser/styles.js.map +1 -0
- package/lib/commonjs/ui/components/authChooser/types.js +70 -0
- package/lib/commonjs/ui/components/authChooser/types.js.map +1 -0
- package/lib/commonjs/ui/components/authChooser/useUsernameAvailability.js +50 -0
- package/lib/commonjs/ui/components/authChooser/useUsernameAvailability.js.map +1 -0
- package/lib/commonjs/ui/components/fileManagement/AnimatedButton.js +3 -2
- package/lib/commonjs/ui/components/fileManagement/AnimatedButton.js.map +1 -1
- package/lib/commonjs/ui/components/fileManagement/FileDetailsModal.js +3 -2
- package/lib/commonjs/ui/components/fileManagement/FileDetailsModal.js.map +1 -1
- package/lib/commonjs/ui/components/fileManagement/FileViewer.js +15 -14
- package/lib/commonjs/ui/components/fileManagement/FileViewer.js.map +1 -1
- package/lib/commonjs/ui/components/fileManagement/UploadPreview.js +6 -5
- package/lib/commonjs/ui/components/fileManagement/UploadPreview.js.map +1 -1
- package/lib/commonjs/ui/components/modals/DeleteAccountModal.js +3 -2
- package/lib/commonjs/ui/components/modals/DeleteAccountModal.js.map +1 -1
- package/lib/commonjs/ui/components/payment/PaymentDetailsStep.js +6 -6
- package/lib/commonjs/ui/components/payment/PaymentDetailsStep.js.map +1 -1
- package/lib/commonjs/ui/components/payment/PaymentMethodStep.js +5 -5
- package/lib/commonjs/ui/components/payment/PaymentMethodStep.js.map +1 -1
- package/lib/commonjs/ui/components/payment/PaymentReviewStep.js +10 -9
- package/lib/commonjs/ui/components/payment/PaymentReviewStep.js.map +1 -1
- package/lib/commonjs/ui/components/payment/PaymentSuccessStep.js +4 -3
- package/lib/commonjs/ui/components/payment/PaymentSuccessStep.js.map +1 -1
- package/lib/commonjs/ui/components/payment/PaymentSummaryStep.js +6 -5
- package/lib/commonjs/ui/components/payment/PaymentSummaryStep.js.map +1 -1
- package/lib/commonjs/ui/context/OxyContext.js +200 -29
- package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
- package/lib/commonjs/ui/context/commitSessionFlow.js +43 -0
- package/lib/commonjs/ui/context/commitSessionFlow.js.map +1 -1
- package/lib/commonjs/ui/context/useOxyAccountGraph.js +13 -5
- package/lib/commonjs/ui/context/useOxyAccountGraph.js.map +1 -1
- package/lib/commonjs/ui/hooks/useSwitchableAccounts.js +6 -1
- package/lib/commonjs/ui/hooks/useSwitchableAccounts.js.map +1 -1
- package/lib/commonjs/ui/index.js +0 -13
- package/lib/commonjs/ui/index.js.map +1 -1
- package/lib/commonjs/ui/oauth/browserAuthTransport.js +168 -0
- package/lib/commonjs/ui/oauth/browserAuthTransport.js.map +1 -0
- package/lib/commonjs/ui/oauth/completeOAuthCode.js +78 -0
- package/lib/commonjs/ui/oauth/completeOAuthCode.js.map +1 -0
- package/lib/commonjs/ui/oauth/legacyRedirectLanes.js +48 -0
- package/lib/commonjs/ui/oauth/legacyRedirectLanes.js.map +1 -0
- package/lib/commonjs/ui/oauth/oauthHandshake.js +53 -0
- package/lib/commonjs/ui/oauth/oauthHandshake.js.map +1 -0
- package/lib/commonjs/ui/oauth/oauthPopup.js +229 -0
- package/lib/commonjs/ui/oauth/oauthPopup.js.map +1 -0
- package/lib/commonjs/ui/oauth/oauthPopupMessages.js +141 -0
- package/lib/commonjs/ui/oauth/oauthPopupMessages.js.map +1 -0
- package/lib/commonjs/ui/oauth/types.js +2 -0
- package/lib/commonjs/ui/oauth/types.js.map +1 -0
- package/lib/commonjs/ui/screens/AccountMembersScreen.js +4 -3
- package/lib/commonjs/ui/screens/AccountMembersScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/CreateAccountScreen.js +7 -6
- package/lib/commonjs/ui/screens/CreateAccountScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/EditProfileFieldScreen.js +4 -3
- package/lib/commonjs/ui/screens/EditProfileFieldScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FAQScreen.js +3 -2
- package/lib/commonjs/ui/screens/FAQScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FeedbackScreen.js +11 -10
- package/lib/commonjs/ui/screens/FeedbackScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FileManagementScreen.js +19 -18
- package/lib/commonjs/ui/screens/FileManagementScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/LanguageSelectorScreen.js +4 -3
- package/lib/commonjs/ui/screens/LanguageSelectorScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ManageAccountScreen.js +2 -2
- package/lib/commonjs/ui/screens/ManageAccountScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PaymentGatewayScreen.js +3 -3
- package/lib/commonjs/ui/screens/PaymentGatewayScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js +9 -8
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ProfileScreen.js +10 -10
- package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/UserListScreen.js +3 -3
- package/lib/commonjs/ui/screens/UserListScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js +3 -2
- package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/fileManagement/FileLibraryError.js +4 -3
- package/lib/commonjs/ui/screens/fileManagement/FileLibraryError.js.map +1 -1
- package/lib/commonjs/ui/screens/fileManagement/FileListSection.js +4 -3
- package/lib/commonjs/ui/screens/fileManagement/FileListSection.js.map +1 -1
- package/lib/commonjs/ui/screens/fileManagement/PhotoPickerSection.js +4 -3
- package/lib/commonjs/ui/screens/fileManagement/PhotoPickerSection.js.map +1 -1
- package/lib/commonjs/ui/screens/fileManagement/UploadBar.js +3 -2
- package/lib/commonjs/ui/screens/fileManagement/UploadBar.js.map +1 -1
- package/lib/commonjs/ui/screens/trust/TrustCenterScreen.js +3 -2
- package/lib/commonjs/ui/screens/trust/TrustCenterScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/trust/TrustLeaderboardScreen.js +4 -3
- package/lib/commonjs/ui/screens/trust/TrustLeaderboardScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/trust/TrustRewardsScreen.js +4 -3
- package/lib/commonjs/ui/screens/trust/TrustRewardsScreen.js.map +1 -1
- package/lib/commonjs/ui/server.js +2 -5
- package/lib/commonjs/ui/server.js.map +1 -1
- package/lib/commonjs/ui/session/authStore.js +6 -75
- package/lib/commonjs/ui/session/authStore.js.map +1 -1
- package/lib/commonjs/ui/session/createSessionClient.js +11 -3
- package/lib/commonjs/ui/session/createSessionClient.js.map +1 -1
- package/lib/commonjs/ui/session/identityBinding.js +95 -0
- package/lib/commonjs/ui/session/identityBinding.js.map +1 -0
- package/lib/commonjs/ui/session/index.js +13 -0
- package/lib/commonjs/ui/session/index.js.map +1 -1
- package/lib/commonjs/ui/session/nativeSecureStorage.js +90 -0
- package/lib/commonjs/ui/session/nativeSecureStorage.js.map +1 -0
- package/lib/commonjs/ui/session/tokenTransport.js +11 -1
- package/lib/commonjs/ui/session/tokenTransport.js.map +1 -1
- package/lib/commonjs/ui/utils/crossOriginRestore.js +3 -2
- package/lib/commonjs/ui/utils/crossOriginRestore.js.map +1 -1
- package/lib/commonjs/ui/utils/deliveryPlatform.js +58 -0
- package/lib/commonjs/ui/utils/deliveryPlatform.js.map +1 -0
- package/lib/commonjs/ui/utils/oauthReturn.js +70 -46
- package/lib/commonjs/ui/utils/oauthReturn.js.map +1 -1
- package/lib/module/index.js +27 -4
- package/lib/module/index.js.map +1 -1
- package/lib/module/notifications/deviceNotifications.js +371 -0
- package/lib/module/notifications/deviceNotifications.js.map +1 -0
- package/lib/module/ui/boot/runProviderColdBoot.js +51 -9
- package/lib/module/ui/boot/runProviderColdBoot.js.map +1 -1
- package/lib/module/ui/client.js +0 -1
- package/lib/module/ui/client.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/OxyAccountDialogScreen.js +14 -3
- package/lib/module/ui/components/OxyAccountDialogScreen.js.map +1 -1
- package/lib/module/ui/components/OxyAuthChooser.js +74 -1126
- package/lib/module/ui/components/OxyAuthChooser.js.map +1 -1
- package/lib/module/ui/components/OxyConsentScreen.js +50 -12
- package/lib/module/ui/components/OxyConsentScreen.js.map +1 -1
- package/lib/module/ui/components/OxyProvider.js +4 -4
- package/lib/module/ui/components/OxyProvider.js.map +1 -1
- package/lib/module/ui/components/OxySignInButton.js +76 -42
- package/lib/module/ui/components/OxySignInButton.js.map +1 -1
- package/lib/module/ui/components/OxySignInRequestSurface.js +141 -0
- package/lib/module/ui/components/OxySignInRequestSurface.js.map +1 -0
- package/lib/module/ui/components/ProfileButton.js +1 -1
- package/lib/module/ui/components/ProfileButton.js.map +1 -1
- package/lib/module/ui/components/SettingsIcon.js +1 -1
- package/lib/module/ui/components/SettingsIcon.js.map +1 -1
- package/lib/module/ui/components/authChooser/AccountsMenuView.js +523 -0
- package/lib/module/ui/components/authChooser/AccountsMenuView.js.map +1 -0
- package/lib/module/ui/components/authChooser/SignInEntryView.js +85 -0
- package/lib/module/ui/components/authChooser/SignInEntryView.js.map +1 -0
- package/lib/module/ui/components/authChooser/SignInRequestView.js +101 -0
- package/lib/module/ui/components/authChooser/SignInRequestView.js.map +1 -0
- package/lib/module/ui/components/authChooser/SignUpView.js +184 -0
- package/lib/module/ui/components/authChooser/SignUpView.js.map +1 -0
- package/lib/module/ui/components/authChooser/TroubleDisclosure.js +57 -0
- package/lib/module/ui/components/authChooser/TroubleDisclosure.js.map +1 -0
- package/lib/module/ui/components/authChooser/primitives.js +163 -0
- package/lib/module/ui/components/authChooser/primitives.js.map +1 -0
- package/lib/module/ui/components/authChooser/requestSurfaces.js +143 -0
- package/lib/module/ui/components/authChooser/requestSurfaces.js.map +1 -0
- package/lib/module/ui/components/authChooser/signInProgress.js +50 -0
- package/lib/module/ui/components/authChooser/signInProgress.js.map +1 -0
- package/lib/module/ui/components/{oxyAuthChooserStyles.js → authChooser/styles.js} +19 -1
- package/lib/module/ui/components/authChooser/styles.js.map +1 -0
- package/lib/module/ui/components/authChooser/types.js +66 -0
- package/lib/module/ui/components/authChooser/types.js.map +1 -0
- package/lib/module/ui/components/authChooser/useUsernameAvailability.js +46 -0
- package/lib/module/ui/components/authChooser/useUsernameAvailability.js.map +1 -0
- package/lib/module/ui/components/fileManagement/AnimatedButton.js +1 -1
- package/lib/module/ui/components/fileManagement/AnimatedButton.js.map +1 -1
- package/lib/module/ui/components/fileManagement/FileDetailsModal.js +1 -1
- package/lib/module/ui/components/fileManagement/FileDetailsModal.js.map +1 -1
- package/lib/module/ui/components/fileManagement/FileViewer.js +1 -1
- package/lib/module/ui/components/fileManagement/FileViewer.js.map +1 -1
- package/lib/module/ui/components/fileManagement/UploadPreview.js +1 -1
- package/lib/module/ui/components/fileManagement/UploadPreview.js.map +1 -1
- package/lib/module/ui/components/modals/DeleteAccountModal.js +1 -1
- package/lib/module/ui/components/modals/DeleteAccountModal.js.map +1 -1
- package/lib/module/ui/components/payment/PaymentDetailsStep.js +1 -1
- package/lib/module/ui/components/payment/PaymentDetailsStep.js.map +1 -1
- package/lib/module/ui/components/payment/PaymentMethodStep.js +1 -1
- package/lib/module/ui/components/payment/PaymentMethodStep.js.map +1 -1
- package/lib/module/ui/components/payment/PaymentReviewStep.js +1 -1
- package/lib/module/ui/components/payment/PaymentReviewStep.js.map +1 -1
- package/lib/module/ui/components/payment/PaymentSuccessStep.js +1 -1
- package/lib/module/ui/components/payment/PaymentSuccessStep.js.map +1 -1
- package/lib/module/ui/components/payment/PaymentSummaryStep.js +1 -1
- package/lib/module/ui/components/payment/PaymentSummaryStep.js.map +1 -1
- package/lib/module/ui/context/OxyContext.js +203 -32
- package/lib/module/ui/context/OxyContext.js.map +1 -1
- package/lib/module/ui/context/commitSessionFlow.js +42 -0
- package/lib/module/ui/context/commitSessionFlow.js.map +1 -1
- package/lib/module/ui/context/useOxyAccountGraph.js +13 -5
- package/lib/module/ui/context/useOxyAccountGraph.js.map +1 -1
- package/lib/module/ui/hooks/useSwitchableAccounts.js +6 -1
- package/lib/module/ui/hooks/useSwitchableAccounts.js.map +1 -1
- package/lib/module/ui/index.js +0 -1
- package/lib/module/ui/index.js.map +1 -1
- package/lib/module/ui/oauth/browserAuthTransport.js +165 -0
- package/lib/module/ui/oauth/browserAuthTransport.js.map +1 -0
- package/lib/module/ui/oauth/completeOAuthCode.js +75 -0
- package/lib/module/ui/oauth/completeOAuthCode.js.map +1 -0
- package/lib/module/ui/oauth/legacyRedirectLanes.js +44 -0
- package/lib/module/ui/oauth/legacyRedirectLanes.js.map +1 -0
- package/lib/module/ui/oauth/oauthHandshake.js +50 -0
- package/lib/module/ui/oauth/oauthHandshake.js.map +1 -0
- package/lib/module/ui/oauth/oauthPopup.js +221 -0
- package/lib/module/ui/oauth/oauthPopup.js.map +1 -0
- package/lib/module/ui/oauth/oauthPopupMessages.js +135 -0
- package/lib/module/ui/oauth/oauthPopupMessages.js.map +1 -0
- package/lib/module/ui/oauth/types.js +2 -0
- package/lib/module/ui/oauth/types.js.map +1 -0
- package/lib/module/ui/screens/AccountMembersScreen.js +1 -1
- package/lib/module/ui/screens/AccountMembersScreen.js.map +1 -1
- package/lib/module/ui/screens/CreateAccountScreen.js +1 -1
- package/lib/module/ui/screens/CreateAccountScreen.js.map +1 -1
- package/lib/module/ui/screens/EditProfileFieldScreen.js +1 -1
- package/lib/module/ui/screens/EditProfileFieldScreen.js.map +1 -1
- package/lib/module/ui/screens/FAQScreen.js +1 -1
- package/lib/module/ui/screens/FAQScreen.js.map +1 -1
- package/lib/module/ui/screens/FeedbackScreen.js +1 -1
- package/lib/module/ui/screens/FeedbackScreen.js.map +1 -1
- package/lib/module/ui/screens/FileManagementScreen.js +2 -1
- package/lib/module/ui/screens/FileManagementScreen.js.map +1 -1
- package/lib/module/ui/screens/LanguageSelectorScreen.js +1 -1
- package/lib/module/ui/screens/LanguageSelectorScreen.js.map +1 -1
- package/lib/module/ui/screens/ManageAccountScreen.js +1 -1
- package/lib/module/ui/screens/ManageAccountScreen.js.map +1 -1
- package/lib/module/ui/screens/PaymentGatewayScreen.js +1 -1
- package/lib/module/ui/screens/PaymentGatewayScreen.js.map +1 -1
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js +1 -1
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
- package/lib/module/ui/screens/ProfileScreen.js +1 -1
- package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/module/ui/screens/UserListScreen.js +1 -1
- package/lib/module/ui/screens/UserListScreen.js.map +1 -1
- package/lib/module/ui/screens/WelcomeNewUserScreen.js +1 -1
- package/lib/module/ui/screens/WelcomeNewUserScreen.js.map +1 -1
- package/lib/module/ui/screens/fileManagement/FileLibraryError.js +1 -1
- package/lib/module/ui/screens/fileManagement/FileLibraryError.js.map +1 -1
- package/lib/module/ui/screens/fileManagement/FileListSection.js +1 -1
- package/lib/module/ui/screens/fileManagement/FileListSection.js.map +1 -1
- package/lib/module/ui/screens/fileManagement/PhotoPickerSection.js +2 -1
- package/lib/module/ui/screens/fileManagement/PhotoPickerSection.js.map +1 -1
- package/lib/module/ui/screens/fileManagement/UploadBar.js +1 -1
- package/lib/module/ui/screens/fileManagement/UploadBar.js.map +1 -1
- package/lib/module/ui/screens/trust/TrustCenterScreen.js +1 -1
- package/lib/module/ui/screens/trust/TrustCenterScreen.js.map +1 -1
- package/lib/module/ui/screens/trust/TrustLeaderboardScreen.js +1 -1
- 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/server.js +0 -2
- package/lib/module/ui/server.js.map +1 -1
- package/lib/module/ui/session/authStore.js +5 -75
- package/lib/module/ui/session/authStore.js.map +1 -1
- package/lib/module/ui/session/createSessionClient.js +11 -3
- package/lib/module/ui/session/createSessionClient.js.map +1 -1
- package/lib/module/ui/session/identityBinding.js +89 -0
- package/lib/module/ui/session/identityBinding.js.map +1 -0
- package/lib/module/ui/session/index.js +5 -2
- package/lib/module/ui/session/index.js.map +1 -1
- package/lib/module/ui/session/nativeSecureStorage.js +88 -0
- package/lib/module/ui/session/nativeSecureStorage.js.map +1 -0
- package/lib/module/ui/session/tokenTransport.js +11 -1
- package/lib/module/ui/session/tokenTransport.js.map +1 -1
- package/lib/module/ui/utils/crossOriginRestore.js +4 -3
- package/lib/module/ui/utils/crossOriginRestore.js.map +1 -1
- package/lib/module/ui/utils/deliveryPlatform.js +55 -0
- package/lib/module/ui/utils/deliveryPlatform.js.map +1 -0
- package/lib/module/ui/utils/oauthReturn.js +70 -46
- package/lib/module/ui/utils/oauthReturn.js.map +1 -1
- package/lib/typescript/commonjs/index.d.ts +9 -1
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/notifications/deviceNotifications.d.ts +141 -0
- package/lib/typescript/commonjs/notifications/deviceNotifications.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/boot/runProviderColdBoot.d.ts +34 -2
- package/lib/typescript/commonjs/ui/boot/runProviderColdBoot.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/client.d.ts +0 -1
- package/lib/typescript/commonjs/ui/client.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 +16 -29
- package/lib/typescript/commonjs/ui/components/OxyAuthChooser.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/OxyConsentScreen.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 +17 -12
- package/lib/typescript/commonjs/ui/components/OxySignInButton.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/OxySignInRequestSurface.d.ts +108 -0
- package/lib/typescript/commonjs/ui/components/OxySignInRequestSurface.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/SettingsIcon.d.ts +1 -1
- package/lib/typescript/commonjs/ui/components/SettingsIcon.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/authChooser/AccountsMenuView.d.ts +38 -0
- package/lib/typescript/commonjs/ui/components/authChooser/AccountsMenuView.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/authChooser/SignInEntryView.d.ts +32 -0
- package/lib/typescript/commonjs/ui/components/authChooser/SignInEntryView.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/authChooser/SignInRequestView.d.ts +34 -0
- package/lib/typescript/commonjs/ui/components/authChooser/SignInRequestView.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/authChooser/SignUpView.d.ts +34 -0
- package/lib/typescript/commonjs/ui/components/authChooser/SignUpView.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/authChooser/TroubleDisclosure.d.ts +36 -0
- package/lib/typescript/commonjs/ui/components/authChooser/TroubleDisclosure.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/authChooser/primitives.d.ts +55 -0
- package/lib/typescript/commonjs/ui/components/authChooser/primitives.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/authChooser/requestSurfaces.d.ts +58 -0
- package/lib/typescript/commonjs/ui/components/authChooser/requestSurfaces.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/authChooser/signInProgress.d.ts +26 -0
- package/lib/typescript/commonjs/ui/components/authChooser/signInProgress.d.ts.map +1 -0
- package/lib/typescript/{module/ui/components/oxyAuthChooserStyles.d.ts → commonjs/ui/components/authChooser/styles.d.ts} +19 -1
- package/lib/typescript/commonjs/ui/components/authChooser/styles.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/authChooser/types.d.ts +103 -0
- package/lib/typescript/commonjs/ui/components/authChooser/types.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/authChooser/useUsernameAvailability.d.ts +16 -0
- package/lib/typescript/commonjs/ui/components/authChooser/useUsernameAvailability.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/payment/types.d.ts +1 -1
- 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/oxyContextTypes.d.ts +44 -1
- package/lib/typescript/commonjs/ui/context/oxyContextTypes.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/useOxyAccountGraph.d.ts +7 -1
- package/lib/typescript/commonjs/ui/context/useOxyAccountGraph.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useSwitchableAccounts.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/index.d.ts +0 -1
- package/lib/typescript/commonjs/ui/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/oauth/browserAuthTransport.d.ts +56 -0
- package/lib/typescript/commonjs/ui/oauth/browserAuthTransport.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/oauth/completeOAuthCode.d.ts +49 -0
- package/lib/typescript/commonjs/ui/oauth/completeOAuthCode.d.ts.map +1 -0
- 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/oauthHandshake.d.ts +50 -0
- package/lib/typescript/commonjs/ui/oauth/oauthHandshake.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/oauth/oauthPopup.d.ts +77 -0
- package/lib/typescript/commonjs/ui/oauth/oauthPopup.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/oauth/oauthPopupMessages.d.ts +67 -0
- package/lib/typescript/commonjs/ui/oauth/oauthPopupMessages.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/oauth/types.d.ts +176 -0
- package/lib/typescript/commonjs/ui/oauth/types.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/screens/FeedbackScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/FileManagementScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/fileManagement/PhotoPickerSection.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/server.d.ts +0 -2
- package/lib/typescript/commonjs/ui/server.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/session/authStore.d.ts +3 -7
- package/lib/typescript/commonjs/ui/session/authStore.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/session/createSessionClient.d.ts +8 -1
- package/lib/typescript/commonjs/ui/session/createSessionClient.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/session/identityBinding.d.ts +66 -0
- package/lib/typescript/commonjs/ui/session/identityBinding.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/session/index.d.ts +6 -2
- package/lib/typescript/commonjs/ui/session/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/session/nativeSecureStorage.d.ts +25 -0
- package/lib/typescript/commonjs/ui/session/nativeSecureStorage.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/session/tokenTransport.d.ts +8 -1
- package/lib/typescript/commonjs/ui/session/tokenTransport.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/types/navigation.d.ts +44 -0
- package/lib/typescript/commonjs/ui/types/navigation.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/utils/crossOriginRestore.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/utils/deliveryPlatform.d.ts +33 -0
- package/lib/typescript/commonjs/ui/utils/deliveryPlatform.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/utils/fileManagement.d.ts +1 -1
- package/lib/typescript/commonjs/ui/utils/fileManagement.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/utils/oauthReturn.d.ts +30 -16
- package/lib/typescript/commonjs/ui/utils/oauthReturn.d.ts.map +1 -1
- package/lib/typescript/module/index.d.ts +9 -1
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/lib/typescript/module/notifications/deviceNotifications.d.ts +141 -0
- package/lib/typescript/module/notifications/deviceNotifications.d.ts.map +1 -0
- package/lib/typescript/module/ui/boot/runProviderColdBoot.d.ts +34 -2
- package/lib/typescript/module/ui/boot/runProviderColdBoot.d.ts.map +1 -1
- package/lib/typescript/module/ui/client.d.ts +0 -1
- package/lib/typescript/module/ui/client.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 +16 -29
- package/lib/typescript/module/ui/components/OxyAuthChooser.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/OxyConsentScreen.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 +17 -12
- package/lib/typescript/module/ui/components/OxySignInButton.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/OxySignInRequestSurface.d.ts +108 -0
- package/lib/typescript/module/ui/components/OxySignInRequestSurface.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/SettingsIcon.d.ts +1 -1
- package/lib/typescript/module/ui/components/SettingsIcon.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/authChooser/AccountsMenuView.d.ts +38 -0
- package/lib/typescript/module/ui/components/authChooser/AccountsMenuView.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/authChooser/SignInEntryView.d.ts +32 -0
- package/lib/typescript/module/ui/components/authChooser/SignInEntryView.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/authChooser/SignInRequestView.d.ts +34 -0
- package/lib/typescript/module/ui/components/authChooser/SignInRequestView.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/authChooser/SignUpView.d.ts +34 -0
- package/lib/typescript/module/ui/components/authChooser/SignUpView.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/authChooser/TroubleDisclosure.d.ts +36 -0
- package/lib/typescript/module/ui/components/authChooser/TroubleDisclosure.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/authChooser/primitives.d.ts +55 -0
- package/lib/typescript/module/ui/components/authChooser/primitives.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/authChooser/requestSurfaces.d.ts +58 -0
- package/lib/typescript/module/ui/components/authChooser/requestSurfaces.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/authChooser/signInProgress.d.ts +26 -0
- package/lib/typescript/module/ui/components/authChooser/signInProgress.d.ts.map +1 -0
- package/lib/typescript/{commonjs/ui/components/oxyAuthChooserStyles.d.ts → module/ui/components/authChooser/styles.d.ts} +19 -1
- package/lib/typescript/module/ui/components/authChooser/styles.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/authChooser/types.d.ts +103 -0
- package/lib/typescript/module/ui/components/authChooser/types.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/authChooser/useUsernameAvailability.d.ts +16 -0
- package/lib/typescript/module/ui/components/authChooser/useUsernameAvailability.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/payment/types.d.ts +1 -1
- 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/oxyContextTypes.d.ts +44 -1
- package/lib/typescript/module/ui/context/oxyContextTypes.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/useOxyAccountGraph.d.ts +7 -1
- package/lib/typescript/module/ui/context/useOxyAccountGraph.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useSwitchableAccounts.d.ts.map +1 -1
- package/lib/typescript/module/ui/index.d.ts +0 -1
- package/lib/typescript/module/ui/index.d.ts.map +1 -1
- package/lib/typescript/module/ui/oauth/browserAuthTransport.d.ts +56 -0
- package/lib/typescript/module/ui/oauth/browserAuthTransport.d.ts.map +1 -0
- package/lib/typescript/module/ui/oauth/completeOAuthCode.d.ts +49 -0
- package/lib/typescript/module/ui/oauth/completeOAuthCode.d.ts.map +1 -0
- 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/oauthHandshake.d.ts +50 -0
- package/lib/typescript/module/ui/oauth/oauthHandshake.d.ts.map +1 -0
- package/lib/typescript/module/ui/oauth/oauthPopup.d.ts +77 -0
- package/lib/typescript/module/ui/oauth/oauthPopup.d.ts.map +1 -0
- package/lib/typescript/module/ui/oauth/oauthPopupMessages.d.ts +67 -0
- package/lib/typescript/module/ui/oauth/oauthPopupMessages.d.ts.map +1 -0
- package/lib/typescript/module/ui/oauth/types.d.ts +176 -0
- package/lib/typescript/module/ui/oauth/types.d.ts.map +1 -0
- package/lib/typescript/module/ui/screens/FeedbackScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/FileManagementScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/fileManagement/PhotoPickerSection.d.ts.map +1 -1
- package/lib/typescript/module/ui/server.d.ts +0 -2
- package/lib/typescript/module/ui/server.d.ts.map +1 -1
- package/lib/typescript/module/ui/session/authStore.d.ts +3 -7
- package/lib/typescript/module/ui/session/authStore.d.ts.map +1 -1
- package/lib/typescript/module/ui/session/createSessionClient.d.ts +8 -1
- package/lib/typescript/module/ui/session/createSessionClient.d.ts.map +1 -1
- package/lib/typescript/module/ui/session/identityBinding.d.ts +66 -0
- package/lib/typescript/module/ui/session/identityBinding.d.ts.map +1 -0
- package/lib/typescript/module/ui/session/index.d.ts +6 -2
- package/lib/typescript/module/ui/session/index.d.ts.map +1 -1
- package/lib/typescript/module/ui/session/nativeSecureStorage.d.ts +25 -0
- package/lib/typescript/module/ui/session/nativeSecureStorage.d.ts.map +1 -0
- package/lib/typescript/module/ui/session/tokenTransport.d.ts +8 -1
- package/lib/typescript/module/ui/session/tokenTransport.d.ts.map +1 -1
- package/lib/typescript/module/ui/types/navigation.d.ts +44 -0
- package/lib/typescript/module/ui/types/navigation.d.ts.map +1 -1
- package/lib/typescript/module/ui/utils/crossOriginRestore.d.ts.map +1 -1
- package/lib/typescript/module/ui/utils/deliveryPlatform.d.ts +33 -0
- package/lib/typescript/module/ui/utils/deliveryPlatform.d.ts.map +1 -0
- package/lib/typescript/module/ui/utils/fileManagement.d.ts +1 -1
- package/lib/typescript/module/ui/utils/fileManagement.d.ts.map +1 -1
- package/lib/typescript/module/ui/utils/oauthReturn.d.ts +30 -16
- package/lib/typescript/module/ui/utils/oauthReturn.d.ts.map +1 -1
- package/package.json +15 -7
- package/src/index.ts +50 -5
- package/src/notifications/deviceNotifications.ts +395 -0
- package/src/ui/boot/__tests__/coldBootWebAuthMode.test.ts +281 -0
- package/src/ui/boot/runProviderColdBoot.ts +83 -13
- package/src/ui/client.ts +0 -1
- package/src/ui/components/AvatarCameraBadge.tsx +1 -1
- package/src/ui/components/OxyAccountDialogScreen.tsx +20 -3
- package/src/ui/components/OxyAuthChooser.tsx +91 -1230
- package/src/ui/components/OxyConsentScreen.tsx +56 -13
- package/src/ui/components/OxyProvider.tsx +4 -4
- package/src/ui/components/OxySignInButton.tsx +119 -78
- package/src/ui/components/OxySignInRequestSurface.tsx +202 -0
- package/src/ui/components/ProfileButton.tsx +1 -1
- package/src/ui/components/SettingsIcon.tsx +1 -1
- package/src/ui/components/__tests__/OxyConsentScreen.test.tsx +27 -0
- package/src/ui/components/authChooser/AccountsMenuView.tsx +569 -0
- package/src/ui/components/authChooser/SignInEntryView.tsx +121 -0
- package/src/ui/components/authChooser/SignInRequestView.tsx +130 -0
- package/src/ui/components/authChooser/SignUpView.tsx +174 -0
- package/src/ui/components/authChooser/TroubleDisclosure.tsx +73 -0
- package/src/ui/components/authChooser/primitives.tsx +144 -0
- package/src/ui/components/authChooser/requestSurfaces.tsx +120 -0
- package/src/ui/components/authChooser/signInProgress.ts +54 -0
- package/src/ui/components/{oxyAuthChooserStyles.ts → authChooser/styles.ts} +18 -0
- package/src/ui/components/authChooser/types.ts +120 -0
- package/src/ui/components/authChooser/useUsernameAvailability.ts +60 -0
- package/src/ui/components/fileManagement/AnimatedButton.tsx +1 -1
- package/src/ui/components/fileManagement/FileDetailsModal.tsx +1 -1
- package/src/ui/components/fileManagement/FileViewer.tsx +1 -1
- package/src/ui/components/fileManagement/UploadPreview.tsx +1 -1
- package/src/ui/components/modals/DeleteAccountModal.tsx +1 -1
- package/src/ui/components/payment/PaymentDetailsStep.tsx +1 -1
- package/src/ui/components/payment/PaymentMethodStep.tsx +1 -1
- package/src/ui/components/payment/PaymentReviewStep.tsx +1 -1
- package/src/ui/components/payment/PaymentSuccessStep.tsx +1 -1
- package/src/ui/components/payment/PaymentSummaryStep.tsx +1 -1
- package/src/ui/components/payment/types.ts +1 -1
- package/src/ui/context/OxyContext.tsx +220 -24
- package/src/ui/context/__tests__/commitSessionFlow.test.ts +89 -0
- package/src/ui/context/commitSessionFlow.ts +61 -0
- package/src/ui/context/oxyContextTypes.ts +45 -1
- package/src/ui/context/useOxyAccountGraph.ts +19 -5
- package/src/ui/hooks/useSwitchableAccounts.ts +12 -1
- package/src/ui/index.ts +0 -1
- package/src/ui/oauth/__tests__/browserAuthTransport.test.ts +335 -0
- package/src/ui/oauth/__tests__/completeOAuthCode.test.ts +142 -0
- package/src/ui/oauth/__tests__/oauthPopup.test.ts +326 -0
- package/src/ui/oauth/__tests__/oauthPopupMessages.test.ts +189 -0
- package/src/ui/oauth/__tests__/sharedCompletionPath.test.ts +174 -0
- package/src/ui/oauth/browserAuthTransport.ts +187 -0
- package/src/ui/oauth/completeOAuthCode.ts +93 -0
- package/src/ui/oauth/legacyRedirectLanes.ts +43 -0
- package/src/ui/oauth/oauthHandshake.ts +74 -0
- package/src/ui/oauth/oauthPopup.ts +219 -0
- package/src/ui/oauth/oauthPopupMessages.ts +136 -0
- package/src/ui/oauth/types.ts +150 -0
- package/src/ui/screens/AccountMembersScreen.tsx +1 -1
- package/src/ui/screens/CreateAccountScreen.tsx +1 -1
- package/src/ui/screens/EditProfileFieldScreen.tsx +1 -1
- package/src/ui/screens/FAQScreen.tsx +1 -1
- package/src/ui/screens/FeedbackScreen.tsx +2 -1
- package/src/ui/screens/FileManagementScreen.tsx +2 -1
- package/src/ui/screens/LanguageSelectorScreen.tsx +1 -1
- package/src/ui/screens/ManageAccountScreen.tsx +1 -1
- package/src/ui/screens/PaymentGatewayScreen.tsx +1 -1
- package/src/ui/screens/PremiumSubscriptionScreen.tsx +1 -1
- package/src/ui/screens/ProfileScreen.tsx +1 -1
- package/src/ui/screens/UserListScreen.tsx +1 -1
- package/src/ui/screens/WelcomeNewUserScreen.tsx +1 -1
- package/src/ui/screens/fileManagement/FileLibraryError.tsx +1 -1
- package/src/ui/screens/fileManagement/FileListSection.tsx +1 -1
- package/src/ui/screens/fileManagement/PhotoPickerSection.tsx +2 -1
- package/src/ui/screens/fileManagement/UploadBar.tsx +1 -1
- package/src/ui/screens/trust/TrustCenterScreen.tsx +1 -1
- package/src/ui/screens/trust/TrustLeaderboardScreen.tsx +1 -1
- package/src/ui/screens/trust/TrustRewardsScreen.tsx +1 -1
- package/src/ui/server.ts +0 -2
- package/src/ui/session/__tests__/createSessionClient.test.ts +26 -0
- package/src/ui/session/__tests__/tokenTransport.test.ts +34 -0
- package/src/ui/session/authStore.ts +5 -89
- package/src/ui/session/createSessionClient.ts +15 -2
- package/src/ui/session/identityBinding.ts +116 -0
- package/src/ui/session/index.ts +6 -2
- package/src/ui/session/nativeSecureStorage.ts +98 -0
- package/src/ui/session/tokenTransport.ts +14 -1
- package/src/ui/types/navigation.ts +44 -1
- package/src/ui/utils/crossOriginRestore.ts +4 -7
- package/src/ui/utils/deliveryPlatform.ts +65 -0
- package/src/ui/utils/fileManagement.ts +1 -1
- package/src/ui/utils/oauthReturn.ts +74 -65
- package/lib/commonjs/assets/assets/fonts/Inter/Inter_18pt-Black.ttf +0 -0
- package/lib/commonjs/assets/assets/fonts/Inter/Inter_18pt-Bold.ttf +0 -0
- package/lib/commonjs/assets/assets/fonts/Inter/Inter_18pt-ExtraBold.ttf +0 -0
- package/lib/commonjs/assets/assets/fonts/Inter/Inter_18pt-Light.ttf +0 -0
- package/lib/commonjs/assets/assets/fonts/Inter/Inter_18pt-Medium.ttf +0 -0
- package/lib/commonjs/assets/assets/fonts/Inter/Inter_18pt-Regular.ttf +0 -0
- package/lib/commonjs/assets/assets/fonts/Inter/Inter_18pt-SemiBold.ttf +0 -0
- package/lib/commonjs/assets/fonts/Inter/Inter_18pt-Black.ttf +0 -0
- package/lib/commonjs/assets/fonts/Inter/Inter_18pt-Bold.ttf +0 -0
- package/lib/commonjs/assets/fonts/Inter/Inter_18pt-ExtraBold.ttf +0 -0
- package/lib/commonjs/assets/fonts/Inter/Inter_18pt-Light.ttf +0 -0
- package/lib/commonjs/assets/fonts/Inter/Inter_18pt-Medium.ttf +0 -0
- package/lib/commonjs/assets/fonts/Inter/Inter_18pt-Regular.ttf +0 -0
- package/lib/commonjs/assets/fonts/Inter/Inter_18pt-SemiBold.ttf +0 -0
- package/lib/commonjs/ui/components/FontLoader.js +0 -35
- package/lib/commonjs/ui/components/FontLoader.js.map +0 -1
- package/lib/commonjs/ui/components/FontLoader.native.js +0 -88
- package/lib/commonjs/ui/components/FontLoader.native.js.map +0 -1
- package/lib/commonjs/ui/components/oxyAuthChooserStyles.js.map +0 -1
- package/lib/module/assets/assets/fonts/Inter/Inter_18pt-Black.ttf +0 -0
- package/lib/module/assets/assets/fonts/Inter/Inter_18pt-Bold.ttf +0 -0
- package/lib/module/assets/assets/fonts/Inter/Inter_18pt-ExtraBold.ttf +0 -0
- package/lib/module/assets/assets/fonts/Inter/Inter_18pt-Light.ttf +0 -0
- package/lib/module/assets/assets/fonts/Inter/Inter_18pt-Medium.ttf +0 -0
- package/lib/module/assets/assets/fonts/Inter/Inter_18pt-Regular.ttf +0 -0
- package/lib/module/assets/assets/fonts/Inter/Inter_18pt-SemiBold.ttf +0 -0
- package/lib/module/assets/fonts/Inter/Inter_18pt-Black.ttf +0 -0
- package/lib/module/assets/fonts/Inter/Inter_18pt-Bold.ttf +0 -0
- package/lib/module/assets/fonts/Inter/Inter_18pt-ExtraBold.ttf +0 -0
- package/lib/module/assets/fonts/Inter/Inter_18pt-Light.ttf +0 -0
- package/lib/module/assets/fonts/Inter/Inter_18pt-Medium.ttf +0 -0
- package/lib/module/assets/fonts/Inter/Inter_18pt-Regular.ttf +0 -0
- package/lib/module/assets/fonts/Inter/Inter_18pt-SemiBold.ttf +0 -0
- package/lib/module/ui/components/FontLoader.js +0 -29
- package/lib/module/ui/components/FontLoader.js.map +0 -1
- package/lib/module/ui/components/FontLoader.native.js +0 -83
- package/lib/module/ui/components/FontLoader.native.js.map +0 -1
- package/lib/module/ui/components/oxyAuthChooserStyles.js.map +0 -1
- package/lib/typescript/commonjs/ui/components/FontLoader.d.ts +0 -24
- package/lib/typescript/commonjs/ui/components/FontLoader.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/FontLoader.native.d.ts +0 -13
- package/lib/typescript/commonjs/ui/components/FontLoader.native.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/oxyAuthChooserStyles.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/FontLoader.d.ts +0 -24
- package/lib/typescript/module/ui/components/FontLoader.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/FontLoader.native.d.ts +0 -13
- package/lib/typescript/module/ui/components/FontLoader.native.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/oxyAuthChooserStyles.d.ts.map +0 -1
- package/src/assets/fonts/Inter/Inter_18pt-Black.ttf +0 -0
- package/src/assets/fonts/Inter/Inter_18pt-Bold.ttf +0 -0
- package/src/assets/fonts/Inter/Inter_18pt-ExtraBold.ttf +0 -0
- package/src/assets/fonts/Inter/Inter_18pt-Light.ttf +0 -0
- package/src/assets/fonts/Inter/Inter_18pt-Medium.ttf +0 -0
- package/src/assets/fonts/Inter/Inter_18pt-Regular.ttf +0 -0
- package/src/assets/fonts/Inter/Inter_18pt-SemiBold.ttf +0 -0
- package/src/ui/components/FontLoader.native.tsx +0 -88
- package/src/ui/components/FontLoader.tsx +0 -27
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_reactNative","
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_Ionicons","_interopRequireDefault","_button","_paymentStyles","_useI18n","_jsxRuntime","e","__esModule","default","PaymentSuccessStep","colors","animations","onDone","styles","useMemo","createPaymentStyles","t","useI18n","fadeAnim","slideAnim","scaleAnim","jsxs","Animated","View","style","stepContainer","opacity","transform","translateY","scale","accessibilityRole","accessibilityLabel","children","section","jsx","Text","sectionTitle","successCard","successContent","name","size","color","success","successIcon","successMainTitle","successSubtitle","height","successMessage","Button","variant","onPress","icon","iconPosition","_default","exports"],"sourceR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P,IAAAX,WAAA,CAAA6B,GAAA,EAAChC,OAAA,CAAA8C,MAAM;MAACC,OAAO,EAAC,SAAS;MAACC,OAAO,EAAEtC,MAAO;MAAC4B,IAAI,EAAC,OAAO;MAACW,IAAI,eAAE,IAAA9C,WAAA,CAAA6B,GAAA,EAAClC,SAAA,CAAAQ,OAAQ;QAAC+B,IAAI,EAAC,WAAW;QAACC,IAAI,EAAE;MAAG,CAAE,CAAE;MAACY,YAAY,EAAC,OAAO;MAAApB,QAAA,EACtHhB,CAAC,CAAC,sBAAsB;IAAC,CACtB,CAAC;EAAA,CACE,CAAC;AAExB,CAAC;AAAC,IAAAqC,QAAA,GAAAC,OAAA,CAAA9C,OAAA,GAEaC,kBAAkB","ignoreList":[]}
|
|
@@ -6,13 +6,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _react = require("react");
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
|
-
var
|
|
9
|
+
var _Ionicons = _interopRequireDefault(require("@expo/vector-icons/Ionicons"));
|
|
10
10
|
var _settingsList = require("@oxyhq/bloom/settings-list");
|
|
11
11
|
var _button = require("@oxyhq/bloom/button");
|
|
12
12
|
var _paymentStyles = require("./paymentStyles.js");
|
|
13
13
|
var _constants = require("./constants.js");
|
|
14
14
|
var _useI18n = require("../../hooks/useI18n.js");
|
|
15
15
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
16
17
|
const getItemTypeIcon = type => {
|
|
17
18
|
switch (type) {
|
|
18
19
|
case 'product':
|
|
@@ -67,7 +68,7 @@ const PaymentSummaryStep = ({
|
|
|
67
68
|
style: styles.summaryCard,
|
|
68
69
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
69
70
|
style: styles.summaryCardContent,
|
|
70
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
71
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Ionicons.default, {
|
|
71
72
|
name: "receipt-outline",
|
|
72
73
|
size: 64,
|
|
73
74
|
color: colors.primary,
|
|
@@ -83,7 +84,7 @@ const PaymentSummaryStep = ({
|
|
|
83
84
|
style: styles.summaryCardItems,
|
|
84
85
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_settingsList.SettingsListGroup, {
|
|
85
86
|
children: paymentItems.map((item, idx) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_settingsList.SettingsListItem, {
|
|
86
|
-
icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
87
|
+
icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Ionicons.default, {
|
|
87
88
|
name: getItemTypeIcon(item.type),
|
|
88
89
|
size: 20,
|
|
89
90
|
color: colors.primary
|
|
@@ -171,7 +172,7 @@ const PaymentSummaryStep = ({
|
|
|
171
172
|
variant: "secondary",
|
|
172
173
|
onPress: onClose,
|
|
173
174
|
size: "small",
|
|
174
|
-
icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
175
|
+
icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Ionicons.default, {
|
|
175
176
|
name: "close",
|
|
176
177
|
size: 16
|
|
177
178
|
}),
|
|
@@ -180,7 +181,7 @@ const PaymentSummaryStep = ({
|
|
|
180
181
|
variant: "primary",
|
|
181
182
|
onPress: onNext,
|
|
182
183
|
size: "small",
|
|
183
|
-
icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
184
|
+
icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Ionicons.default, {
|
|
184
185
|
name: "arrow-forward",
|
|
185
186
|
size: 16
|
|
186
187
|
}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_reactNative","
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_Ionicons","_interopRequireDefault","_settingsList","_button","_paymentStyles","_constants","_useI18n","_jsxRuntime","e","__esModule","default","getItemTypeIcon","type","PaymentSummaryStep","paymentItems","amount","currency","description","colors","animations","onClose","onNext","styles","useMemo","createPaymentStyles","t","useI18n","currencySymbol","getCurrencySymbol","fadeAnim","slideAnim","scaleAnim","jsxs","Animated","View","style","stepContainer","opacity","transform","translateY","scale","accessibilityRole","accessibilityLabel","children","section","jsx","Text","sectionTitle","summaryCard","summaryCardContent","name","size","color","primary","summaryCardIcon","summaryCardMainTitle","length","summaryCardSubtitle","Fragment","summaryCardItems","SettingsListGroup","map","item","idx","SettingsListItem","icon","title","quantity","period","CURRENCY_SYMBOLS","toUpperCase","price","showChevron","rightElement","summaryItemPrice","summaryCardDivider","summaryCardTotalSection","summaryCardTotalRow","summaryCardTotalLabel","summaryCardTotalValue","summaryCardAmount","summaryCardAmountLabel","summaryCardAmountValue","summaryCardAmountDescription","flexDirection","gap","justifyContent","Button","variant","onPress","iconPosition","_default","exports"],"sourceRoot":"../../../../../src","sources":["ui/components/payment/PaymentSummaryStep.tsx"],"mappings":";;;;;;AAEA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,aAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AACA,IAAAM,cAAA,GAAAN,OAAA;AACA,IAAAO,UAAA,GAAAP,OAAA;AAEA,IAAAQ,QAAA,GAAAR,OAAA;AAA8C,IAAAS,WAAA,GAAAT,OAAA;AAAA,SAAAG,uBAAAO,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAe9C,MAAMG,eAAe,GAAIC,IAAY,IAAkB;EACnD,QAAQA,IAAI;IACR,KAAK,SAAS;MAAE,OAAO,cAAc;IACrC,KAAK,cAAc;MAAE,OAAO,gBAAgB;IAC5C,KAAK,SAAS;MAAE,OAAO,mBAAmB;IAC1C,KA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AO;UAACC,IAAI,EAAE;QAAG,CAAE,CAAE;QAAAR,QAAA,EAChGlB,CAAC,CAAC,uBAAuB;MAAC,CACvB,CAAC,eACT,IAAAlB,WAAA,CAAAsC,GAAA,EAAC1C,OAAA,CAAAoF,MAAM;QAACC,OAAO,EAAC,SAAS;QAACC,OAAO,EAAEpE,MAAO;QAAC8B,IAAI,EAAC,OAAO;QAACc,IAAI,eAAE,IAAA1D,WAAA,CAAAsC,GAAA,EAAC7C,SAAA,CAAAU,OAAQ;UAACwC,IAAI,EAAC,eAAe;UAACC,IAAI,EAAE;QAAG,CAAE,CAAE;QAACuC,YAAY,EAAC,OAAO;QAAA/C,QAAA,EAC1HlB,CAAC,CAAC,0BAA0B;MAAC,CAC1B,CAAC;IAAA,CACP,CAAC;EAAA,CACI,CAAC;AAExB,CAAC;AAAC,IAAAkE,QAAA,GAAAC,OAAA,CAAAlF,OAAA,GAEaG,kBAAkB","ignoreList":[]}
|
|
@@ -11,7 +11,9 @@ var _core = require("@oxyhq/core");
|
|
|
11
11
|
var _accountDialogManager = require("../navigation/accountDialogManager.js");
|
|
12
12
|
var _oauthNavigation = require("../components/oauthNavigation.js");
|
|
13
13
|
var _passkeyHubPopup = require("../components/passkeyHubPopup.js");
|
|
14
|
+
var _browserAuthTransport = require("../oauth/browserAuthTransport.js");
|
|
14
15
|
var _isWebBrowser = require("../utils/isWebBrowser.js");
|
|
16
|
+
var _deliveryPlatform = require("../utils/deliveryPlatform.js");
|
|
15
17
|
var _runProviderColdBoot = require("../boot/runProviderColdBoot.js");
|
|
16
18
|
var _deviceCredential = require("../utils/deviceCredential.js");
|
|
17
19
|
var _authStore = require("../stores/authStore.js");
|
|
@@ -45,6 +47,8 @@ const OxyProvider = ({
|
|
|
45
47
|
authorizeBaseUrl,
|
|
46
48
|
storageKeyPrefix = 'oxy_session',
|
|
47
49
|
clientId: clientIdProp,
|
|
50
|
+
sessionMode = 'account',
|
|
51
|
+
webAuthMode = 'redirect',
|
|
48
52
|
hubSync = true,
|
|
49
53
|
onAuthStateChange,
|
|
50
54
|
onError
|
|
@@ -75,6 +79,23 @@ const OxyProvider = ({
|
|
|
75
79
|
authStoreRef.current = (0, _index.createPlatformAuthStateStore)();
|
|
76
80
|
}
|
|
77
81
|
const authStore = authStoreRef.current;
|
|
82
|
+
|
|
83
|
+
// Identity-bound session binding (`sessionMode: 'identity'`) — the platform pin
|
|
84
|
+
// store plus the memoised pinned account id every lane below binds to. Built
|
|
85
|
+
// ONCE per provider mount and ONLY in identity mode: an account-mode provider
|
|
86
|
+
// never constructs one, so `identity` is `null` there and every branch keyed on
|
|
87
|
+
// it collapses to today's behaviour.
|
|
88
|
+
//
|
|
89
|
+
// Like `oxyServices` / `baseURL`, `sessionMode` is mount-time configuration: it
|
|
90
|
+
// is read once and a later change does not re-bind the provider. Latching it
|
|
91
|
+
// this way also fails SAFE — a provider that started identity-bound can never
|
|
92
|
+
// be downgraded mid-flight into following the device's active account.
|
|
93
|
+
const identityRef = (0, _react.useRef)(null);
|
|
94
|
+
if (sessionMode === 'identity' && !identityRef.current) {
|
|
95
|
+
identityRef.current = (0, _index.createIdentitySessionBinding)();
|
|
96
|
+
}
|
|
97
|
+
const identity = identityRef.current;
|
|
98
|
+
const isIdentityBound = identity !== null;
|
|
78
99
|
const {
|
|
79
100
|
user,
|
|
80
101
|
isAuthenticated,
|
|
@@ -261,13 +282,62 @@ const OxyProvider = ({
|
|
|
261
282
|
void clearSessionStateRef.current().catch(clearError => {
|
|
262
283
|
logger('Failed to clear local state on remote sign-out', clearError);
|
|
263
284
|
});
|
|
264
|
-
}
|
|
285
|
+
},
|
|
286
|
+
// `null` for every account-mode provider — identical to omitting the
|
|
287
|
+
// option — and the pinned account id once an identity-bound provider has
|
|
288
|
+
// resolved its pin. Read through the ref so the resolver stays stable for
|
|
289
|
+
// the client's lifetime while still seeing later resolutions.
|
|
290
|
+
() => identityRef.current?.getPinnedAccountId() ?? null);
|
|
265
291
|
}
|
|
266
292
|
const {
|
|
267
293
|
client: sessionClient,
|
|
268
294
|
host: sessionClientHost
|
|
269
295
|
} = sessionClientPairRef.current;
|
|
270
296
|
|
|
297
|
+
// Re-establishment lane for an identity-bound provider whose pin is missing or
|
|
298
|
+
// whose pinned account is no longer part of this device's session set (another
|
|
299
|
+
// app signed it out, or the device was re-provisioned). Adopting whichever
|
|
300
|
+
// account the device is currently switched to is exactly the drift
|
|
301
|
+
// `sessionMode: 'identity'` exists to prevent, so the only correct answer is to
|
|
302
|
+
// re-derive the session from the local identity key.
|
|
303
|
+
//
|
|
304
|
+
// Bounded on purpose: at most ONE attempt per applied device revision, and
|
|
305
|
+
// never two concurrently — a repeated failure (locked keychain, offline, no
|
|
306
|
+
// local identity) must never spin a sign-in loop against the server. Nothing
|
|
307
|
+
// awaits it, so it can never deadlock against the projection that triggers it;
|
|
308
|
+
// the `bootstrap()` below re-applies device state, whose notify re-runs the
|
|
309
|
+
// projection with the pin now resolved.
|
|
310
|
+
const identityEstablishRef = (0, _react.useRef)({
|
|
311
|
+
revision: null,
|
|
312
|
+
inFlight: false
|
|
313
|
+
});
|
|
314
|
+
const reestablishIdentitySession = (0, _react.useCallback)((binding, revision) => {
|
|
315
|
+
const tracker = identityEstablishRef.current;
|
|
316
|
+
if (tracker.inFlight || tracker.revision === revision) {
|
|
317
|
+
return;
|
|
318
|
+
}
|
|
319
|
+
tracker.revision = revision;
|
|
320
|
+
tracker.inFlight = true;
|
|
321
|
+
void (async () => {
|
|
322
|
+
const established = await (0, _core.establishIdentitySession)({
|
|
323
|
+
oxy: oxyServices,
|
|
324
|
+
store: authStore,
|
|
325
|
+
binding: binding.binding
|
|
326
|
+
});
|
|
327
|
+
if (!established) {
|
|
328
|
+
return;
|
|
329
|
+
}
|
|
330
|
+
// The verify wrote a fresh pin; adopt it before re-reading device state
|
|
331
|
+
// so the notify that follows projects against the new binding.
|
|
332
|
+
await binding.refreshPinnedAccountId();
|
|
333
|
+
await sessionClient.bootstrap();
|
|
334
|
+
})().catch(establishError => {
|
|
335
|
+
logger('Failed to re-establish the identity-bound session', establishError);
|
|
336
|
+
}).finally(() => {
|
|
337
|
+
tracker.inFlight = false;
|
|
338
|
+
});
|
|
339
|
+
}, [oxyServices, authStore, sessionClient, logger]);
|
|
340
|
+
|
|
271
341
|
// Projects `client.getState()` onto the exposed `sessions`/`activeSessionId`/
|
|
272
342
|
// `user`. Sole authority for both locally-initiated mutations (switch/logout)
|
|
273
343
|
// AND remotely-pushed `session_state` over the `device:<deviceId>` socket.
|
|
@@ -289,6 +359,13 @@ const OxyProvider = ({
|
|
|
289
359
|
// Last-write-wins guard: capture the revision this projection is for, then
|
|
290
360
|
// after the async profile fetch bail if a fresher state has landed.
|
|
291
361
|
const capturedRevision = state.revision;
|
|
362
|
+
// Resolve the pin BEFORE the profile fetch (memoised: one storage + keychain
|
|
363
|
+
// read per boot) so every projection below is bound on the FIRST pass over a
|
|
364
|
+
// freshly applied state. Deferring it would let a sibling app's switch render
|
|
365
|
+
// once as this client's user before the pin corrected it. `null` for every
|
|
366
|
+
// account-mode provider, where each projection falls back to the device's
|
|
367
|
+
// active account exactly as before.
|
|
368
|
+
const pinnedAccountId = identity ? await identity.ensurePinnedAccountId() : null;
|
|
292
369
|
const ids = (0, _index.accountIdsOf)(state);
|
|
293
370
|
let users = [];
|
|
294
371
|
try {
|
|
@@ -301,15 +378,26 @@ const OxyProvider = ({
|
|
|
301
378
|
if (!latest || latest.revision !== capturedRevision) {
|
|
302
379
|
return;
|
|
303
380
|
}
|
|
381
|
+
if (identity && (pinnedAccountId === null || (0, _index.activeSessionIdOf)(latest, pinnedAccountId) === null)) {
|
|
382
|
+
// Either no verified pin, or the pinned account left this device's session
|
|
383
|
+
// set. Projecting anything here would mean projecting SOMEBODY ELSE's
|
|
384
|
+
// account, so leave the current projection untouched and re-derive the
|
|
385
|
+
// session from the local identity key instead.
|
|
386
|
+
reestablishIdentitySession(identity, latest.revision);
|
|
387
|
+
return;
|
|
388
|
+
}
|
|
304
389
|
const usersById = new Map(users.map(resolvedUser => [resolvedUser.id, resolvedUser]));
|
|
305
|
-
updateSessions((0, _index.deviceStateToClientSessions)(latest, usersById));
|
|
306
|
-
setActiveSessionId((0, _index.activeSessionIdOf)(latest));
|
|
307
|
-
const activeUser = (0, _index.activeUserOf)(latest, usersById);
|
|
390
|
+
updateSessions((0, _index.deviceStateToClientSessions)(latest, usersById, pinnedAccountId));
|
|
391
|
+
setActiveSessionId((0, _index.activeSessionIdOf)(latest, pinnedAccountId));
|
|
392
|
+
const activeUser = (0, _index.activeUserOf)(latest, usersById, pinnedAccountId);
|
|
308
393
|
if (activeUser) {
|
|
309
394
|
loginSuccess(activeUser);
|
|
310
395
|
}
|
|
311
|
-
|
|
312
|
-
|
|
396
|
+
// The host's current account feeds the socket handshake and the bearer's
|
|
397
|
+
// token-account comparisons, so it tracks the PIN — never the account another
|
|
398
|
+
// app switched the device to.
|
|
399
|
+
sessionClientHost.setCurrentAccountId(pinnedAccountId ?? latest.activeAccountId);
|
|
400
|
+
}, [identity, oxyServices, reestablishIdentitySession, sessionClient, sessionClientHost, updateSessions, setActiveSessionId, loginSuccess, clearSessionState, logger]);
|
|
313
401
|
const syncFromClientRef = (0, _react.useRef)(syncFromClient);
|
|
314
402
|
syncFromClientRef.current = syncFromClient;
|
|
315
403
|
const syncDeviceCredentialToHost = (0, _react.useCallback)(async () => {
|
|
@@ -429,17 +517,23 @@ const OxyProvider = ({
|
|
|
429
517
|
// credential via `POST /session/device/token`) plus the proactive scheduler
|
|
430
518
|
// that refreshes ~60s before expiry and on tab-focus. Replaces the deleted
|
|
431
519
|
// services-local `inSessionTokenRefresh` module.
|
|
520
|
+
// An identity binding turns every re-mint pinned: it targets the pinned
|
|
521
|
+
// account instead of the device's active one, and its recovery arm becomes the
|
|
522
|
+
// PRIMARY-key identity sign-in rather than the cross-app shared keychain.
|
|
432
523
|
(0, _react.useEffect)(() => {
|
|
433
524
|
const dispose = (0, _core.installAuthRefreshHandler)({
|
|
434
525
|
oxy: oxyServices,
|
|
435
|
-
store: authStore
|
|
526
|
+
store: authStore,
|
|
527
|
+
...(identity ? {
|
|
528
|
+
identity: identity.binding
|
|
529
|
+
} : {})
|
|
436
530
|
});
|
|
437
531
|
const scheduler = (0, _core.startTokenRefreshScheduler)(oxyServices);
|
|
438
532
|
return () => {
|
|
439
533
|
scheduler.dispose();
|
|
440
534
|
dispose();
|
|
441
535
|
};
|
|
442
|
-
}, [oxyServices, authStore]);
|
|
536
|
+
}, [oxyServices, authStore, identity]);
|
|
443
537
|
|
|
444
538
|
// ── Session commit funnel ────────────────────────────────────────────────
|
|
445
539
|
// The single place a session becomes committed: plant tokens, persist the
|
|
@@ -516,21 +610,22 @@ const OxyProvider = ({
|
|
|
516
610
|
onAuthStateChange: onAuthStateChangeRef.current,
|
|
517
611
|
markAuthResolved: markAuthResolvedRef.current
|
|
518
612
|
});
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
613
|
+
|
|
614
|
+
// Post-sign-in hub sync — a full-page redirect to auth.oxy.so. Gated HERE,
|
|
615
|
+
// inside the ONE commit funnel, so NO commit path (QR device flow,
|
|
616
|
+
// password/2FA through the account dialog, passkey, popup OAuth, cold
|
|
617
|
+
// boot) can bounce a `webAuthMode: 'popup'` tab to the IdP. See
|
|
618
|
+
// `maybeSyncHubAfterCommit` for the full gate list.
|
|
619
|
+
await (0, _commitSessionFlow.maybeSyncHubAfterCommit)({
|
|
620
|
+
activate: options.activate,
|
|
621
|
+
hubSyncRequested: options.hubSync === true,
|
|
622
|
+
hubSyncEnabled: hubSync,
|
|
623
|
+
webAuthMode,
|
|
624
|
+
syncHub: () => (0, _core.syncHubAfterSignIn)(oxyServices, {
|
|
625
|
+
enabled: hubSync
|
|
626
|
+
})
|
|
627
|
+
});
|
|
628
|
+
}, [oxyServices, authStore, updateSessions, setActiveSessionId, sessionClient, sessionClientHost, syncFromClient, loginSuccess, logger, hubSync, webAuthMode]);
|
|
534
629
|
const commitSessionRef = (0, _react.useRef)(commitSession);
|
|
535
630
|
commitSessionRef.current = commitSession;
|
|
536
631
|
|
|
@@ -576,6 +671,28 @@ const OxyProvider = ({
|
|
|
576
671
|
});
|
|
577
672
|
}, [commitSession]);
|
|
578
673
|
|
|
674
|
+
// ── Web third-party OAuth sign-in ──────────────────────────────────────────
|
|
675
|
+
// The shared operation `OxySignInButton` (and any RP-owned button) delegates
|
|
676
|
+
// to, so no consumer ever writes popup listeners or a token exchange. The
|
|
677
|
+
// transport picks popup vs redirect from `webAuthMode`; both lanes land on the
|
|
678
|
+
// SAME completion path (`completeOAuthCode`) and the same commit funnel here.
|
|
679
|
+
//
|
|
680
|
+
// `hubSync: false` is deliberate: hub sync is a full-page redirect to
|
|
681
|
+
// auth.oxy.so, which would undo the one thing popup mode exists to guarantee —
|
|
682
|
+
// that the relying party never leaves its route. It matches how the redirect
|
|
683
|
+
// lane's return leg commits (see `runProviderColdBoot`).
|
|
684
|
+
const startWebOAuthSignInForContext = (0, _react.useCallback)(options => (0, _browserAuthTransport.startWebOAuthSignIn)({
|
|
685
|
+
mode: webAuthMode,
|
|
686
|
+
oxyServices,
|
|
687
|
+
clientId,
|
|
688
|
+
authorizeBaseUrl,
|
|
689
|
+
identityBound: isIdentityBound,
|
|
690
|
+
commitSession: input => commitSessionRef.current(input, {
|
|
691
|
+
activate: true,
|
|
692
|
+
hubSync: false
|
|
693
|
+
})
|
|
694
|
+
}, options), [webAuthMode, oxyServices, clientId, authorizeBaseUrl, isIdentityBound]);
|
|
695
|
+
|
|
579
696
|
// ── Unified account dialog ─────────────────────────────────────────────────
|
|
580
697
|
// The single account-chooser + sign-in surface. Built ONCE per provider mount
|
|
581
698
|
// and bound to the live `oxyServices` + `sessionClient` + this provider's
|
|
@@ -616,8 +733,14 @@ const OxyProvider = ({
|
|
|
616
733
|
}
|
|
617
734
|
accountDialogSurfaceRef.current?.dismiss();
|
|
618
735
|
}, []);
|
|
736
|
+
|
|
737
|
+
// Never built while identity-bound: the dialog exists to CHOOSE an account,
|
|
738
|
+
// and an identity-bound client has exactly one — the owner of the local
|
|
739
|
+
// identity key. Leaving it `null` (the same shape consumers see with no
|
|
740
|
+
// provider mounted) keeps its QR/polling machinery off entirely instead of
|
|
741
|
+
// relying on UI-level filtering to hide it.
|
|
619
742
|
const accountDialogControllerRef = (0, _react.useRef)(null);
|
|
620
|
-
if (!accountDialogControllerRef.current) {
|
|
743
|
+
if (!isIdentityBound && !accountDialogControllerRef.current) {
|
|
621
744
|
accountDialogControllerRef.current = (0, _core.createAccountDialogController)({
|
|
622
745
|
oxyServices,
|
|
623
746
|
sessionClient,
|
|
@@ -650,11 +773,27 @@ const OxyProvider = ({
|
|
|
650
773
|
// popup (b2) for a non-Oxy origin. `undefined` on native — there is no
|
|
651
774
|
// popup concept there, and off-origin passkey sign-in isn't reachable
|
|
652
775
|
// (Commons owns the native flow).
|
|
653
|
-
openPopup: (0, _isWebBrowser.isWebBrowser)() ? _passkeyHubPopup.openPasskeyHubPopup : undefined
|
|
776
|
+
openPopup: (0, _isWebBrowser.isWebBrowser)() ? _passkeyHubPopup.openPasskeyHubPopup : undefined,
|
|
777
|
+
// Which surface a sign-in starts from — a FACT only this consumer can
|
|
778
|
+
// supply (headless core never touches a platform global). It decides
|
|
779
|
+
// whether automatic delivery may take the same-device Commons deep link;
|
|
780
|
+
// without it the controller stays `'unknown'` and that route never fires.
|
|
781
|
+
platform: (0, _deliveryPlatform.resolveDeliveryPlatform)()
|
|
654
782
|
});
|
|
655
783
|
}
|
|
656
784
|
const accountDialogController = accountDialogControllerRef.current;
|
|
657
785
|
const openAccountDialog = (0, _react.useCallback)(view => {
|
|
786
|
+
if (isIdentityBound) {
|
|
787
|
+
// No controller was built, and there is nothing to choose: this app's user
|
|
788
|
+
// is fixed to the owner of the local identity key.
|
|
789
|
+
if (__DEV__) {
|
|
790
|
+
_core.logger.warn('openAccountDialog ignored: the session is identity-bound (sessionMode: "identity")', {
|
|
791
|
+
component: 'OxyContext',
|
|
792
|
+
method: 'openAccountDialog'
|
|
793
|
+
});
|
|
794
|
+
}
|
|
795
|
+
return;
|
|
796
|
+
}
|
|
658
797
|
const nextView = view ?? 'accounts';
|
|
659
798
|
accountDialogControllerRef.current?.setView(nextView);
|
|
660
799
|
|
|
@@ -704,7 +843,7 @@ const OxyProvider = ({
|
|
|
704
843
|
}
|
|
705
844
|
});
|
|
706
845
|
setAccountDialogOpen(true);
|
|
707
|
-
}, []);
|
|
846
|
+
}, [isIdentityBound]);
|
|
708
847
|
const closeAccountDialog = (0, _react.useCallback)(() => {
|
|
709
848
|
accountDialogControllerRef.current?.cancelSignIn();
|
|
710
849
|
dismissAccountDialogSurface();
|
|
@@ -806,19 +945,38 @@ const OxyProvider = ({
|
|
|
806
945
|
// ── Cold boot ────────────────────────────────────────────────────────────
|
|
807
946
|
// Device-first session restore via `runProviderColdBoot` (see boot/runProviderColdBoot.ts).
|
|
808
947
|
const runColdBoot = (0, _react.useCallback)(async () => {
|
|
948
|
+
// Resolve the pin BEFORE any boot lane runs: `getPinnedAccountId()` is a
|
|
949
|
+
// SYNCHRONOUS read on `SessionClient`'s apply path, and a stale `null` there
|
|
950
|
+
// would let a pinned client behave like an account-mode one for the first
|
|
951
|
+
// state it applies (including re-electing the device's active account).
|
|
952
|
+
if (identity) {
|
|
953
|
+
await identity.ensurePinnedAccountId();
|
|
954
|
+
}
|
|
809
955
|
await (0, _runProviderColdBoot.runProviderColdBoot)({
|
|
810
956
|
oxyServices,
|
|
811
957
|
authStore,
|
|
812
958
|
clientId: clientIdProp,
|
|
813
959
|
authRedirectUri,
|
|
814
960
|
authorizeBaseUrl,
|
|
961
|
+
sessionMode,
|
|
962
|
+
identity: identity?.binding,
|
|
963
|
+
// Popup mode forbids the boot's automatic full-page `prompt=none` restore:
|
|
964
|
+
// a domain with no local credential resolves signed out instead of
|
|
965
|
+
// navigating the tab to the IdP (see `allowsAutomaticIdpRedirect`).
|
|
966
|
+
webAuthMode,
|
|
815
967
|
sessionClient,
|
|
816
968
|
syncDeviceCredentialToHost,
|
|
817
969
|
commitSession: (input, options) => commitSessionRef.current(input, options),
|
|
818
970
|
markAuthResolved: () => markAuthResolvedRef.current(),
|
|
819
971
|
setTokenReady
|
|
820
972
|
});
|
|
821
|
-
|
|
973
|
+
// The boot may have (re-)established the identity session or cleared a pin
|
|
974
|
+
// whose key no longer exists, so re-resolve rather than trusting the memo
|
|
975
|
+
// taken before it ran.
|
|
976
|
+
if (identity) {
|
|
977
|
+
await identity.refreshPinnedAccountId();
|
|
978
|
+
}
|
|
979
|
+
}, [oxyServices, authStore, clientIdProp, authRedirectUri, authorizeBaseUrl, sessionMode, identity, webAuthMode, syncDeviceCredentialToHost, sessionClient]);
|
|
822
980
|
(0, _react.useEffect)(() => {
|
|
823
981
|
if (initialized) {
|
|
824
982
|
return;
|
|
@@ -904,7 +1062,13 @@ const OxyProvider = ({
|
|
|
904
1062
|
// Exposed `switchSession`: route through the server-authoritative
|
|
905
1063
|
// `SessionClient`. Resolve the target account from the current device state,
|
|
906
1064
|
// ask the server to switch, reproject, and return the now-active user.
|
|
1065
|
+
//
|
|
1066
|
+
// Identity-bound providers reject: this is the session-keyed twin of
|
|
1067
|
+
// `switchToAccount`, so leaving it live would be a bypass around the same rule.
|
|
907
1068
|
const switchSessionForContext = (0, _react.useCallback)(async sessionId => {
|
|
1069
|
+
if (isIdentityBound) {
|
|
1070
|
+
throw new _index.IdentityBoundSessionError('switchSession');
|
|
1071
|
+
}
|
|
908
1072
|
const targetAccountId = sessionClient.getState()?.accounts.find(account => account.sessionId === sessionId)?.accountId;
|
|
909
1073
|
if (!targetAccountId) {
|
|
910
1074
|
throw new Error(`No device account found for session "${sessionId}"`);
|
|
@@ -916,7 +1080,7 @@ const OxyProvider = ({
|
|
|
916
1080
|
throw new Error('Active account profile could not be resolved after switch');
|
|
917
1081
|
}
|
|
918
1082
|
return activeUser;
|
|
919
|
-
}, [sessionClient, syncFromClient]);
|
|
1083
|
+
}, [isIdentityBound, sessionClient, syncFromClient]);
|
|
920
1084
|
|
|
921
1085
|
// Thin passthroughs to the platform-agnostic KeyManager. NOTE: both now THROW
|
|
922
1086
|
// `IdentityUnavailableError` (from `@oxyhq/core`) when identity storage is
|
|
@@ -947,6 +1111,7 @@ const OxyProvider = ({
|
|
|
947
1111
|
isAuthenticated,
|
|
948
1112
|
tokenReady,
|
|
949
1113
|
initialized,
|
|
1114
|
+
identityBound: isIdentityBound,
|
|
950
1115
|
oxyServices,
|
|
951
1116
|
sessionClient,
|
|
952
1117
|
syncFromClient,
|
|
@@ -969,6 +1134,8 @@ const OxyProvider = ({
|
|
|
969
1134
|
isPrivateApiPending,
|
|
970
1135
|
isAuthResolved: authResolved,
|
|
971
1136
|
isStorageReady: storage !== null,
|
|
1137
|
+
sessionMode: isIdentityBound ? 'identity' : 'account',
|
|
1138
|
+
webAuthMode,
|
|
972
1139
|
error,
|
|
973
1140
|
currentLanguage,
|
|
974
1141
|
currentLanguages,
|
|
@@ -984,6 +1151,7 @@ const OxyProvider = ({
|
|
|
984
1151
|
removePasskey,
|
|
985
1152
|
revokeSuspiciousSignIn,
|
|
986
1153
|
handleWebSession,
|
|
1154
|
+
startWebOAuthSignIn: startWebOAuthSignInForContext,
|
|
987
1155
|
logout,
|
|
988
1156
|
logoutAll,
|
|
989
1157
|
switchSession: switchSessionForContext,
|
|
@@ -1010,7 +1178,7 @@ const OxyProvider = ({
|
|
|
1010
1178
|
switchToAccount,
|
|
1011
1179
|
refreshAccounts,
|
|
1012
1180
|
createAccount: createAccountFn
|
|
1013
|
-
}), [user, sessions, activeSessionId, isAuthenticated, isLoading, tokenReady, hasAccessToken, canUsePrivateApi, isPrivateApiPending, authResolved, storage, error, currentLanguage, currentLanguages, currentLanguageMetadata, currentLanguageName, currentNativeLanguageName, hasIdentity, getPublicKey, signIn, signInWithPasskey, registerWithPasskey, addPasskey, removePasskey, revokeSuspiciousSignIn, handleWebSession, logout, logoutAll, switchSessionForContext, refreshSessionsForContext, setLanguage, getDeviceSessions, logoutAllDeviceSessions, updateDeviceName, clearSessionState, clearAllAccountData, storageKeyPrefix, clientId, oxyServices, sessionClient, useFollowHook, showBottomSheetForContext, openAvatarPicker, accountDialogController, accountDialogOpen, openAccountDialog, closeAccountDialog, accounts, switchToAccount, refreshAccounts, createAccountFn]);
|
|
1181
|
+
}), [user, sessions, activeSessionId, isAuthenticated, isLoading, tokenReady, hasAccessToken, canUsePrivateApi, isPrivateApiPending, authResolved, storage, isIdentityBound, webAuthMode, error, currentLanguage, currentLanguages, currentLanguageMetadata, currentLanguageName, currentNativeLanguageName, hasIdentity, getPublicKey, signIn, signInWithPasskey, registerWithPasskey, addPasskey, removePasskey, revokeSuspiciousSignIn, handleWebSession, startWebOAuthSignInForContext, logout, logoutAll, switchSessionForContext, refreshSessionsForContext, setLanguage, getDeviceSessions, logoutAllDeviceSessions, updateDeviceName, clearSessionState, clearAllAccountData, storageKeyPrefix, clientId, oxyServices, sessionClient, useFollowHook, showBottomSheetForContext, openAvatarPicker, accountDialogController, accountDialogOpen, openAccountDialog, closeAccountDialog, accounts, switchToAccount, refreshAccounts, createAccountFn]);
|
|
1014
1182
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(OxyContext.Provider, {
|
|
1015
1183
|
value: contextValue,
|
|
1016
1184
|
children: children
|
|
@@ -1040,6 +1208,8 @@ const LOADING_STATE = {
|
|
|
1040
1208
|
isPrivateApiPending: true,
|
|
1041
1209
|
isAuthResolved: false,
|
|
1042
1210
|
isStorageReady: false,
|
|
1211
|
+
sessionMode: 'account',
|
|
1212
|
+
webAuthMode: 'redirect',
|
|
1043
1213
|
error: null,
|
|
1044
1214
|
currentLanguage: 'en-US',
|
|
1045
1215
|
currentLanguages: [],
|
|
@@ -1055,6 +1225,7 @@ const LOADING_STATE = {
|
|
|
1055
1225
|
removePasskey: () => rejectMissingProvider(),
|
|
1056
1226
|
revokeSuspiciousSignIn: () => rejectMissingProvider(),
|
|
1057
1227
|
handleWebSession: () => rejectMissingProvider(),
|
|
1228
|
+
startWebOAuthSignIn: () => rejectMissingProvider(),
|
|
1058
1229
|
logout: () => rejectMissingProvider(),
|
|
1059
1230
|
logoutAll: () => rejectMissingProvider(),
|
|
1060
1231
|
switchSession: () => rejectMissingProvider(),
|