@oxyhq/services 22.12.5 → 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 +1 -0
- 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 +31 -49
- 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 +2 -1
- 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 +32 -49
- 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 +11 -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 +11 -16
- package/lib/typescript/module/ui/utils/oauthReturn.d.ts.map +1 -1
- package/package.json +12 -4
- 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 +2 -0
- package/src/ui/utils/deliveryPlatform.ts +65 -0
- package/src/ui/utils/fileManagement.ts +1 -1
- package/src/ui/utils/oauthReturn.ts +34 -63
- 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
|
@@ -33,14 +33,22 @@ var _tokenTransport = require("./tokenTransport.js");
|
|
|
33
33
|
*
|
|
34
34
|
* The realtime socket uses bearer when authenticated, or deviceId+deviceSecret
|
|
35
35
|
* when signed out (after the one-shot join redirect).
|
|
36
|
+
*
|
|
37
|
+
* `getPinnedAccountId` reports the account an IDENTITY-BOUND provider
|
|
38
|
+
* (`sessionMode: 'identity'`) is pinned to, and `null` for every account-mode
|
|
39
|
+
* provider — which is exactly the value `SessionClient` and the transport read
|
|
40
|
+
* when the option is absent, so account mode is unchanged. While it reports an
|
|
41
|
+
* account, the client tracks device state truthfully but never re-binds its
|
|
42
|
+
* bearer to the device's mutable active account.
|
|
36
43
|
*/
|
|
37
|
-
function createSessionClient(oxyServices, onUnauthenticated) {
|
|
44
|
+
function createSessionClient(oxyServices, onUnauthenticated, getPinnedAccountId) {
|
|
38
45
|
const host = (0, _core.createSessionClientHost)(oxyServices);
|
|
39
|
-
const transport = (0, _tokenTransport.createTokenTransport)(oxyServices);
|
|
46
|
+
const transport = (0, _tokenTransport.createTokenTransport)(oxyServices, getPinnedAccountId);
|
|
40
47
|
const client = new _core.SessionClient(host, {
|
|
41
48
|
transport,
|
|
42
49
|
socketFactory: _socket.io,
|
|
43
|
-
onUnauthenticated
|
|
50
|
+
onUnauthenticated,
|
|
51
|
+
getPinnedAccountId
|
|
44
52
|
});
|
|
45
53
|
return {
|
|
46
54
|
client,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_socket","require","_core","_tokenTransport","createSessionClient","oxyServices","onUnauthenticated","host","createSessionClientHost","transport","createTokenTransport","client","SessionClient","socketFactory","io"],"sourceRoot":"../../../../src","sources":["ui/session/createSessionClient.ts"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AAMA,IAAAE,eAAA,GAAAF,OAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASG,mBAAmBA,CACjCC,WAAwB,EACxBC,iBAAwD,
|
|
1
|
+
{"version":3,"names":["_socket","require","_core","_tokenTransport","createSessionClient","oxyServices","onUnauthenticated","getPinnedAccountId","host","createSessionClientHost","transport","createTokenTransport","client","SessionClient","socketFactory","io"],"sourceRoot":"../../../../src","sources":["ui/session/createSessionClient.ts"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AAMA,IAAAE,eAAA,GAAAF,OAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASG,mBAAmBA,CACjCC,WAAwB,EACxBC,iBAAwD,EACxDC,kBAAwC,EAIxC;EACA,MAAMC,IAAI,GAAG,IAAAC,6BAAuB,EAACJ,WAAW,CAAC;EACjD,MAAMK,SAAS,GAAG,IAAAC,oCAAoB,EAACN,WAAW,EAAEE,kBAAkB,CAAC;EACvE,MAAMK,MAAM,GAAG,IAAIC,mBAAa,CAACL,IAAI,EAAE;IACrCE,SAAS;IACTI,aAAa,EAAEC,UAAE;IACjBT,iBAAiB;IACjBC;EACF,CAAC,CAAC;EACF,OAAO;IAAEK,MAAM;IAAEJ;EAAK,CAAC;AACzB","ignoreList":[]}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.IdentityBoundSessionError = void 0;
|
|
7
|
+
exports.createIdentitySessionBinding = createIdentitySessionBinding;
|
|
8
|
+
var _core = require("@oxyhq/core");
|
|
9
|
+
var _storageHelpers = require("../utils/storageHelpers.js");
|
|
10
|
+
var _nativeSecureStorage = require("./nativeSecureStorage.js");
|
|
11
|
+
/**
|
|
12
|
+
* Identity-bound sessions — the PLATFORM half of `sessionMode: 'identity'`.
|
|
13
|
+
*
|
|
14
|
+
* `@oxyhq/core` owns everything platform-agnostic about an identity-bound
|
|
15
|
+
* session: the pin store shapes, `resolveIdentityPin`,
|
|
16
|
+
* `establishIdentitySession`, and the pinned cold-boot / re-mint lanes. What it
|
|
17
|
+
* deliberately leaves out is WHICH pin store a given runtime should use, so this
|
|
18
|
+
* module supplies it — web `localStorage` vs the same native SecureStore adapter
|
|
19
|
+
* the device credential already persists through — and adds the one piece of
|
|
20
|
+
* state the provider needs on top: a memoised, SYNCHRONOUSLY readable pinned
|
|
21
|
+
* account id.
|
|
22
|
+
*
|
|
23
|
+
* Why the memo matters: `SessionClient.getPinnedAccountId` is a synchronous read
|
|
24
|
+
* on the socket/apply path, while resolving the pin is asynchronous (a storage
|
|
25
|
+
* read plus a keychain read, through `resolveIdentityPin`). The provider
|
|
26
|
+
* resolves it before the cold boot and after every (re-)established identity
|
|
27
|
+
* session; every read after that is free.
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* The provider-scoped identity binding: the core {@link IdentityBinding} handed
|
|
32
|
+
* to the cold boot and the re-mint handler, plus the resolved pin the projection
|
|
33
|
+
* and `SessionClient` bind to.
|
|
34
|
+
*/
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Thrown by every account-graph mutation while the provider runs in
|
|
38
|
+
* `sessionMode: 'identity'`.
|
|
39
|
+
*
|
|
40
|
+
* An identity-bound app's user is the owner of the local identity key — fixed,
|
|
41
|
+
* for the lifetime of that key. Switching it is not a temporarily-unavailable
|
|
42
|
+
* operation that could be retried, it is not part of this mode's contract at
|
|
43
|
+
* all, so the surfaces reject loudly rather than resolving to a no-op that would
|
|
44
|
+
* read to the caller as a successful switch.
|
|
45
|
+
*/
|
|
46
|
+
class IdentityBoundSessionError extends Error {
|
|
47
|
+
name = 'IdentityBoundSessionError';
|
|
48
|
+
code = 'identity_bound_session';
|
|
49
|
+
constructor(operation) {
|
|
50
|
+
super(`"${operation}" is unavailable while the session is identity-bound (sessionMode: "identity"): this app authenticates as the owner of the local identity key and cannot switch accounts.`);
|
|
51
|
+
this.operation = operation;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Build the identity binding for this runtime. Called ONCE per provider mount,
|
|
57
|
+
* and ONLY when `sessionMode: 'identity'` — account-mode providers never
|
|
58
|
+
* construct a pin store.
|
|
59
|
+
*/
|
|
60
|
+
exports.IdentityBoundSessionError = IdentityBoundSessionError;
|
|
61
|
+
function createIdentitySessionBinding() {
|
|
62
|
+
const pinStore = (0, _storageHelpers.isReactNative)() ? (0, _core.createNativeIdentityPinStore)((0, _nativeSecureStorage.createNativeSecureKeyValueStorage)()) : (0, _core.createWebIdentityPinStore)();
|
|
63
|
+
const binding = {
|
|
64
|
+
pinStore
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
// Only a RESOLVED (non-null) pin is memoised. A `null` outcome is either "not
|
|
68
|
+
// pinned yet" or an indeterminate key read (locked keychain), and caching
|
|
69
|
+
// either one would leave this client permanently unpinned for the rest of the
|
|
70
|
+
// process — the exact state in which it would start following the device's
|
|
71
|
+
// mutable active account.
|
|
72
|
+
let pinnedAccountId = null;
|
|
73
|
+
let inFlight = null;
|
|
74
|
+
const resolve = () => {
|
|
75
|
+
if (!inFlight) {
|
|
76
|
+
inFlight = (0, _core.resolveIdentityPin)(binding).then(pin => {
|
|
77
|
+
pinnedAccountId = pin?.accountId ?? null;
|
|
78
|
+
return pinnedAccountId;
|
|
79
|
+
}).finally(() => {
|
|
80
|
+
inFlight = null;
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
return inFlight;
|
|
84
|
+
};
|
|
85
|
+
return {
|
|
86
|
+
binding,
|
|
87
|
+
getPinnedAccountId: () => pinnedAccountId,
|
|
88
|
+
ensurePinnedAccountId: () => pinnedAccountId !== null ? Promise.resolve(pinnedAccountId) : resolve(),
|
|
89
|
+
refreshPinnedAccountId: () => {
|
|
90
|
+
pinnedAccountId = null;
|
|
91
|
+
return resolve();
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
//# sourceMappingURL=identityBinding.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_core","require","_storageHelpers","_nativeSecureStorage","IdentityBoundSessionError","Error","name","code","constructor","operation","exports","createIdentitySessionBinding","pinStore","isReactNative","createNativeIdentityPinStore","createNativeSecureKeyValueStorage","createWebIdentityPinStore","binding","pinnedAccountId","inFlight","resolve","resolveIdentityPin","then","pin","accountId","finally","getPinnedAccountId","ensurePinnedAccountId","Promise","refreshPinnedAccountId"],"sourceRoot":"../../../../src","sources":["ui/session/identityBinding.ts"],"mappings":";;;;;;;AAkBA,IAAAA,KAAA,GAAAC,OAAA;AAMA,IAAAC,eAAA,GAAAD,OAAA;AACA,IAAAE,oBAAA,GAAAF,OAAA;AAzBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAUA;AACA;AACA;AACA;AACA;;AAqBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMG,yBAAyB,SAASC,KAAK,CAAC;EACjCC,IAAI,GAAG,2BAA2B;EAC3CC,IAAI,GAAG,wBAAwB;EACxCC,WAAWA,CAAUC,SAAiB,EAAE;IACtC,KAAK,CACH,IAAIA,SAAS,2KACf,CAAC;IAAC,KAHiBA,SAAiB,GAAjBA,SAAiB;EAItC;AACF;;AAEA;AACA;AACA;AACA;AACA;AAJAC,OAAA,CAAAN,yBAAA,GAAAA,yBAAA;AAKO,SAASO,4BAA4BA,CAAA,EAA2B;EACrE,MAAMC,QAAQ,GAAG,IAAAC,6BAAa,EAAC,CAAC,GAC5B,IAAAC,kCAA4B,EAAC,IAAAC,sDAAiC,EAAC,CAAC,CAAC,GACjE,IAAAC,+BAAyB,EAAC,CAAC;EAC/B,MAAMC,OAAwB,GAAG;IAAEL;EAAS,CAAC;;EAE7C;EACA;EACA;EACA;EACA;EACA,IAAIM,eAA8B,GAAG,IAAI;EACzC,IAAIC,QAAuC,GAAG,IAAI;EAElD,MAAMC,OAAO,GAAGA,CAAA,KAA8B;IAC5C,IAAI,CAACD,QAAQ,EAAE;MACbA,QAAQ,GAAG,IAAAE,wBAAkB,EAACJ,OAAO,CAAC,CACnCK,IAAI,CAAEC,GAAG,IAAK;QACbL,eAAe,GAAGK,GAAG,EAAEC,SAAS,IAAI,IAAI;QACxC,OAAON,eAAe;MACxB,CAAC,CAAC,CACDO,OAAO,CAAC,MAAM;QACbN,QAAQ,GAAG,IAAI;MACjB,CAAC,CAAC;IACN;IACA,OAAOA,QAAQ;EACjB,CAAC;EAED,OAAO;IACLF,OAAO;IACPS,kBAAkB,EAAEA,CAAA,KAAMR,eAAe;IACzCS,qBAAqB,EAAEA,CAAA,KACrBT,eAAe,KAAK,IAAI,GAAGU,OAAO,CAACR,OAAO,CAACF,eAAe,CAAC,GAAGE,OAAO,CAAC,CAAC;IACzES,sBAAsB,EAAEA,CAAA,KAAM;MAC5BX,eAAe,GAAG,IAAI;MACtB,OAAOE,OAAO,CAAC,CAAC;IAClB;EACF,CAAC;AACH","ignoreList":[]}
|
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
Object.defineProperty(exports, "IdentityBoundSessionError", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _identityBinding.IdentityBoundSessionError;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
6
12
|
Object.defineProperty(exports, "accountIdsOf", {
|
|
7
13
|
enumerable: true,
|
|
8
14
|
get: function () {
|
|
@@ -21,6 +27,12 @@ Object.defineProperty(exports, "activeUserOf", {
|
|
|
21
27
|
return _core.activeUserOf;
|
|
22
28
|
}
|
|
23
29
|
});
|
|
30
|
+
Object.defineProperty(exports, "createIdentitySessionBinding", {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
get: function () {
|
|
33
|
+
return _identityBinding.createIdentitySessionBinding;
|
|
34
|
+
}
|
|
35
|
+
});
|
|
24
36
|
Object.defineProperty(exports, "createPlatformAuthStateStore", {
|
|
25
37
|
enumerable: true,
|
|
26
38
|
get: function () {
|
|
@@ -54,5 +66,6 @@ Object.defineProperty(exports, "deviceStateToClientSessions", {
|
|
|
54
66
|
var _createSessionClient = require("./createSessionClient.js");
|
|
55
67
|
var _tokenTransport = require("./tokenTransport.js");
|
|
56
68
|
var _authStore = require("./authStore.js");
|
|
69
|
+
var _identityBinding = require("./identityBinding.js");
|
|
57
70
|
var _core = require("@oxyhq/core");
|
|
58
71
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_createSessionClient","require","_tokenTransport","_authStore","_core"],"sourceRoot":"../../../../src","sources":["ui/session/index.ts"],"mappings":"
|
|
1
|
+
{"version":3,"names":["_createSessionClient","require","_tokenTransport","_authStore","_identityBinding","_core"],"sourceRoot":"../../../../src","sources":["ui/session/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYA,IAAAA,oBAAA,GAAAC,OAAA;AACA,IAAAC,eAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAF,OAAA;AACA,IAAAG,gBAAA,GAAAH,OAAA;AAEA,IAAAI,KAAA,GAAAJ,OAAA","ignoreList":[]}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.createNativeSecureKeyValueStorage = createNativeSecureKeyValueStorage;
|
|
7
|
+
var _storageHelpers = require("../utils/storageHelpers.js");
|
|
8
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } /**
|
|
9
|
+
* The native secure key/value seam every durable `@oxyhq/core` store in this
|
|
10
|
+
* package is built on.
|
|
11
|
+
*
|
|
12
|
+
* `@oxyhq/core` owns the store LOGIC (`createNativeAuthStateStore` for the
|
|
13
|
+
* zero-cookie device credential, `createNativeIdentityPinStore` for the identity
|
|
14
|
+
* pin) and takes its persistence as an injected `NativeKeyValueStorage`. This
|
|
15
|
+
* module supplies that injection ONCE, so those stores can never drift onto
|
|
16
|
+
* different backings — a device credential in SecureStore and a pin in
|
|
17
|
+
* AsyncStorage would resolve differently after a keystore reset.
|
|
18
|
+
*
|
|
19
|
+
* `expo-secure-store` is loaded via a runtime-computed dynamic import (the same
|
|
20
|
+
* optional-native-module pattern `OxyProvider` uses for netinfo / keyboard
|
|
21
|
+
* controller), so the web bundle never pulls it and a device without it falls
|
|
22
|
+
* back to AsyncStorage rather than crashing.
|
|
23
|
+
*/
|
|
24
|
+
// Variable indirection so Metro's static analyzer never traces expo-secure-store
|
|
25
|
+
// into the web bundle; the module is native-only and optional.
|
|
26
|
+
const SECURE_STORE_MODULE = 'expo-secure-store';
|
|
27
|
+
let secureStorePromise = null;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Resolve the `expo-secure-store` module once (memoised), or `null` when it is
|
|
31
|
+
* unavailable — callers then fall back to AsyncStorage. Never throws.
|
|
32
|
+
*/
|
|
33
|
+
function loadSecureStore() {
|
|
34
|
+
if (!secureStorePromise) {
|
|
35
|
+
const moduleName = SECURE_STORE_MODULE;
|
|
36
|
+
secureStorePromise = (specifier => new Promise(r => r(`${specifier}`)).then(s => _interopRequireWildcard(require(s))))(moduleName).then(mod => {
|
|
37
|
+
if (typeof mod.getItemAsync === 'function' && typeof mod.setItemAsync === 'function' && typeof mod.deleteItemAsync === 'function') {
|
|
38
|
+
return {
|
|
39
|
+
getItemAsync: mod.getItemAsync.bind(mod),
|
|
40
|
+
setItemAsync: mod.setItemAsync.bind(mod),
|
|
41
|
+
deleteItemAsync: mod.deleteItemAsync.bind(mod)
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
return null;
|
|
45
|
+
}).catch(() => null);
|
|
46
|
+
}
|
|
47
|
+
return secureStorePromise;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* A native `NativeKeyValueStorage` that prefers `expo-secure-store` (encrypted
|
|
52
|
+
* at rest) and falls back to AsyncStorage when SecureStore is not installed.
|
|
53
|
+
* The SecureStore module is resolved lazily on first access so construction
|
|
54
|
+
* stays synchronous.
|
|
55
|
+
*/
|
|
56
|
+
function createNativeSecureKeyValueStorage() {
|
|
57
|
+
let asyncStorage = null;
|
|
58
|
+
const getAsyncStorage = async () => {
|
|
59
|
+
if (!asyncStorage) {
|
|
60
|
+
asyncStorage = await (0, _storageHelpers.createPlatformStorage)();
|
|
61
|
+
}
|
|
62
|
+
return asyncStorage;
|
|
63
|
+
};
|
|
64
|
+
return {
|
|
65
|
+
getItem: async key => {
|
|
66
|
+
const secure = await loadSecureStore();
|
|
67
|
+
if (secure) {
|
|
68
|
+
return secure.getItemAsync(key);
|
|
69
|
+
}
|
|
70
|
+
return (await getAsyncStorage()).getItem(key);
|
|
71
|
+
},
|
|
72
|
+
setItem: async (key, value) => {
|
|
73
|
+
const secure = await loadSecureStore();
|
|
74
|
+
if (secure) {
|
|
75
|
+
await secure.setItemAsync(key, value);
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
await (await getAsyncStorage()).setItem(key, value);
|
|
79
|
+
},
|
|
80
|
+
removeItem: async key => {
|
|
81
|
+
const secure = await loadSecureStore();
|
|
82
|
+
if (secure) {
|
|
83
|
+
await secure.deleteItemAsync(key);
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
await (await getAsyncStorage()).removeItem(key);
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
//# sourceMappingURL=nativeSecureStorage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_storageHelpers","require","_interopRequireWildcard","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","SECURE_STORE_MODULE","secureStorePromise","loadSecureStore","moduleName","specifier","Promise","then","s","mod","getItemAsync","setItemAsync","deleteItemAsync","bind","catch","createNativeSecureKeyValueStorage","asyncStorage","getAsyncStorage","createPlatformStorage","getItem","key","secure","setItem","value","removeItem"],"sourceRoot":"../../../../src","sources":["ui/session/nativeSecureStorage.ts"],"mappings":";;;;;;AAiBA,IAAAA,eAAA,GAAAC,OAAA;AAAgE,SAAAC,wBAAAC,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAH,uBAAA,YAAAA,CAAAC,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CA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KAAY;IAClC,IAAI,CAACD,YAAY,EAAE;MACjBA,YAAY,GAAG,MAAM,IAAAE,qCAAqB,EAAC,CAAC;IAC9C;IACA,OAAOF,YAAY;EACrB,CAAC;EACD,OAAO;IACLG,OAAO,EAAE,MAAOC,GAAG,IAAK;MACtB,MAAMC,MAAM,GAAG,MAAMlB,eAAe,CAAC,CAAC;MACtC,IAAIkB,MAAM,EAAE;QACV,OAAOA,MAAM,CAACX,YAAY,CAACU,GAAG,CAAC;MACjC;MACA,OAAO,CAAC,MAAMH,eAAe,CAAC,CAAC,EAAEE,OAAO,CAACC,GAAG,CAAC;IAC/C,CAAC;IACDE,OAAO,EAAE,MAAAA,CAAOF,GAAG,EAAEG,KAAK,KAAK;MAC7B,MAAMF,MAAM,GAAG,MAAMlB,eAAe,CAAC,CAAC;MACtC,IAAIkB,MAAM,EAAE;QACV,MAAMA,MAAM,CAACV,YAAY,CAACS,GAAG,EAAEG,KAAK,CAAC;QACrC;MACF;MACA,MAAM,CAAC,MAAMN,eAAe,CAAC,CAAC,EAAEK,OAAO,CAACF,GAAG,EAAEG,KAAK,CAAC;IACrD,CAAC;IACDC,UAAU,EAAE,MAAOJ,GAAG,IAAK;MACzB,MAAMC,MAAM,GAAG,MAAMlB,eAAe,CAAC,CAAC;MACtC,IAAIkB,MAAM,EAAE;QACV,MAAMA,MAAM,CAACT,eAAe,CAACQ,GAAG,CAAC;QACjC;MACF;MACA,MAAM,CAAC,MAAMH,eAAe,CAAC,CAAC,EAAEO,UAAU,CAACJ,GAAG,CAAC;IACjD;EACF,CAAC;AACH","ignoreList":[]}
|
|
@@ -27,10 +27,20 @@ var _core = require("@oxyhq/core");
|
|
|
27
27
|
*
|
|
28
28
|
* A failure is logged and swallowed: this method must never throw out (it runs
|
|
29
29
|
* inside the socket state handler).
|
|
30
|
+
*
|
|
31
|
+
* `getPinnedAccountId` is the identity-bound escape hatch. Converging the bearer
|
|
32
|
+
* on `state.activeAccountId` is precisely what an identity-bound client must
|
|
33
|
+
* never do — its token is minted for the PINNED account by the cold boot /
|
|
34
|
+
* re-mint lane. `SessionClient` already bypasses the transport entirely while
|
|
35
|
+
* pinned; this guard is the services-side half of that contract, so no future
|
|
36
|
+
* wiring can reintroduce the convergence from this end.
|
|
30
37
|
*/
|
|
31
|
-
function createTokenTransport(oxyServices) {
|
|
38
|
+
function createTokenTransport(oxyServices, getPinnedAccountId) {
|
|
32
39
|
return {
|
|
33
40
|
async ensureActiveToken(state) {
|
|
41
|
+
if ((getPinnedAccountId?.() ?? null) !== null) {
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
34
44
|
try {
|
|
35
45
|
// Skip the mint ONLY when the planted bearer already identifies the
|
|
36
46
|
// active account. `getCurrentUserId()` decodes the bearer's `userId`/`id`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_core","require","createTokenTransport","oxyServices","ensureActiveToken","state","activeAccountId","getCurrentUserId","error","logger","warn","component","token","httpService","refreshAccessToken","debug","deviceId"],"sourceRoot":"../../../../src","sources":["ui/session/tokenTransport.ts"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,oBAAoBA,
|
|
1
|
+
{"version":3,"names":["_core","require","createTokenTransport","oxyServices","getPinnedAccountId","ensureActiveToken","state","activeAccountId","getCurrentUserId","error","logger","warn","component","token","httpService","refreshAccessToken","debug","deviceId"],"sourceRoot":"../../../../src","sources":["ui/session/tokenTransport.ts"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,oBAAoBA,CAClCC,WAAwB,EACxBC,kBAAwC,EACxB;EAChB,OAAO;IACL,MAAMC,iBAAiBA,CAACC,KAAyB,EAAiB;MAChE,IAAI,CAACF,kBAAkB,GAAG,CAAC,IAAI,IAAI,MAAM,IAAI,EAAE;QAC7C;MACF;MACA,IAAI;QACF;QACA;QACA;QACA,MAAMG,eAAe,GAAGD,KAAK,CAACC,eAAe;QAC7C,IAAIA,eAAe,KAAK,IAAI,IAAIJ,WAAW,CAACK,gBAAgB,CAAC,CAAC,KAAKD,eAAe,EAAE;UAClF;QACF;MACF,CAAC,CAAC,OAAOE,KAAK,EAAE;QACdC,YAAM,CAACC,IAAI,CAAC,+CAA+C,EAAE;UAAEC,SAAS,EAAE;QAAiB,CAAC,EAAEH,KAAK,CAAC;MACtG;MAEA,IAAI;QACF;QACA;QACA,MAAMI,KAAK,GAAG,MAAMV,WAAW,CAACW,WAAW,CAACC,kBAAkB,CAAC,WAAW,CAAC;QAC3E,IAAI,CAACF,KAAK,EAAE;UACVH,YAAM,CAACM,KAAK,CAAC,gDAAgD,EAAE;YAC7DJ,SAAS,EAAE,gBAAgB;YAC3BK,QAAQ,EAAEX,KAAK,CAACW;UAClB,CAAC,CAAC;QACJ;MACF,CAAC,CAAC,OAAOR,KAAK,EAAE;QACdC,YAAM,CAACC,IAAI,CAAC,mCAAmC,EAAE;UAAEC,SAAS,EAAE;QAAiB,CAAC,EAAEH,KAAK,CAAC;MAC1F;IACF;EACF,CAAC;AACH","ignoreList":[]}
|
|
@@ -134,6 +134,7 @@ function consumeSilentOAuthError() {
|
|
|
134
134
|
// redirected to.
|
|
135
135
|
(0, _oauthReturn.replaceUrlAfterOAuthReturn)(`${url.pathname}${url.search}${url.hash}`);
|
|
136
136
|
}
|
|
137
|
+
(0, _core.clearOAuthHandshake)();
|
|
137
138
|
return error;
|
|
138
139
|
}
|
|
139
140
|
//# sourceMappingURL=crossOriginRestore.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_core","require","_isWebBrowser","_oauthReturn","_oauthNavigation","sessionStore","globalThis","sessionStorage","isCrossOriginRestoreBlocked","store","Boolean","getItem","OXY_CROSS_ORIGIN_RESTORE_ATTEMPTED_KEY","OXY_SILENT_OAUTH_ATTEMPTED_KEY","markCrossOriginRestoreAttempted","setItem","clearCrossOriginRestoreGuards","key","removeItem","isSilentRestoreEligibleOrigin","origin","isLoopbackOrigin","isIdpHubOrigin","isOfficialWebOrigin","maybeStartSilentOAuthRestore","opts","isWebBrowser","location","params","URLSearchParams","search","has","codeVerifier","codeChallenge","generatePkcePair","state","generateOAuthState","persistOAuthHandshake","redirectUri","normalizeOAuthRedirectUri","authorizeUrl","buildOAuthAuthorizeUrl","authorizeBaseUrl","clientId","scope","prompt","redirectToAuthorize","error","logger","warn","component","consumeSilentOAuthError","history","get","replaceState","url","URL","href","searchParams","delete","replaceUrlAfterOAuthReturn","pathname","hash"],"sourceRoot":"../../../../src","sources":["ui/utils/crossOriginRestore.ts"],"mappings":";;;;;;;;;;;AACA,IAAAA,KAAA,GAAAC,OAAA;
|
|
1
|
+
{"version":3,"names":["_core","require","_isWebBrowser","_oauthReturn","_oauthNavigation","sessionStore","globalThis","sessionStorage","isCrossOriginRestoreBlocked","store","Boolean","getItem","OXY_CROSS_ORIGIN_RESTORE_ATTEMPTED_KEY","OXY_SILENT_OAUTH_ATTEMPTED_KEY","markCrossOriginRestoreAttempted","setItem","clearCrossOriginRestoreGuards","key","removeItem","isSilentRestoreEligibleOrigin","origin","isLoopbackOrigin","isIdpHubOrigin","isOfficialWebOrigin","maybeStartSilentOAuthRestore","opts","isWebBrowser","location","params","URLSearchParams","search","has","codeVerifier","codeChallenge","generatePkcePair","state","generateOAuthState","persistOAuthHandshake","redirectUri","normalizeOAuthRedirectUri","authorizeUrl","buildOAuthAuthorizeUrl","authorizeBaseUrl","clientId","scope","prompt","redirectToAuthorize","error","logger","warn","component","consumeSilentOAuthError","history","get","replaceState","url","URL","href","searchParams","delete","replaceUrlAfterOAuthReturn","pathname","hash","clearOAuthHandshake"],"sourceRoot":"../../../../src","sources":["ui/utils/crossOriginRestore.ts"],"mappings":";;;;;;;;;;;AACA,IAAAA,KAAA,GAAAC,OAAA;AAcA,IAAAC,aAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AACA,IAAAG,gBAAA,GAAAH,OAAA;AAEA,SAASI,YAAYA,CAAA,EAAwB;EAC3C,OAAQC,UAAU,CAAkCC,cAAc;AACpE;;AAEA;AACO,SAASC,2BAA2BA,CAAA,EAAY;EACrD,MAAMC,KAAK,GAAGJ,YAAY,CAAC,CAAC;EAC5B,IAAI,CAACI,KAAK,EAAE,OAAO,KAAK;EACxB,OAAOC,OAAO,CACZD,KAAK,CAACE,OAAO,CAACC,4CAAsC,CAAC,IACnDH,KAAK,CAACE,OAAO,CAACE,oCAA8B,CAChD,CAAC;AACH;;AAEA;AACO,SAASC,+BAA+BA,CAAA,EAAS;EACtD,MAAML,KAAK,GAAGJ,YAAY,CAAC,CAAC;EAC5B,IAAI,CAACI,KAAK,EAAE;EACZA,KAAK,CAACM,OAAO,CAACH,4CAAsC,EAAE,GAAG,CAAC;EAC1DH,KAAK,CAACM,OAAO,CAACF,oCAA8B,EAAE,GAAG,CAAC;AACpD;;AAEA;AACO,SAASG,6BAA6BA,CAAA,EAAS;EACpD,MAAMP,KAAK,GAAGJ,YAAY,CAAC,CAAC;EAC5B,IAAI,CAACI,KAAK,EAAE;EACZ,KAAK,MAAMQ,GAAG,IAAI,CAACL,4CAAsC,EAAEC,oCAA8B,CAAC,EAAE;IAC1FJ,KAAK,CAACS,UAAU,CAACD,GAAG,CAAC;EACvB;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASE,6BAA6BA,CAACC,MAAc,EAAW;EACrE,IAAI,IAAAC,sBAAgB,EAACD,MAAM,CAAC,EAAE,OAAO,KAAK;EAC1C,IAAI,IAAAE,oBAAc,EAAC,CAAC,EAAE,OAAO,K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C;EACrB,OAAOhB,KAAK;AACd","ignoreList":[]}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.resolveDeliveryPlatform = resolveDeliveryPlatform;
|
|
7
|
+
var _isWebBrowser = require("./isWebBrowser.js");
|
|
8
|
+
/**
|
|
9
|
+
* Classify the surface a "Sign in with Oxy" request is initiated from, for
|
|
10
|
+
* `AccountDialogController`'s `platform` option (issue #691, Phase 4/5).
|
|
11
|
+
*
|
|
12
|
+
* `@oxyhq/core` deliberately refuses to do this itself — it never touches a
|
|
13
|
+
* platform global — so the consumer that OWNS the environment classifies it and
|
|
14
|
+
* hands the verdict in. The verdict feeds `selectCommonsDelivery`, where it
|
|
15
|
+
* decides one thing only: whether this device may take the `'open-commons'`
|
|
16
|
+
* deep-link route. Getting it wrong in the "mobile" direction is the costly
|
|
17
|
+
* error (a custom-scheme navigation that does not resolve is a dead end with no
|
|
18
|
+
* automatic way back), so every ambiguous signal resolves AWAY from `'mobile'`.
|
|
19
|
+
*
|
|
20
|
+
* No user-agent string is parsed. The two signals used are declarative and
|
|
21
|
+
* standardized:
|
|
22
|
+
* 1. `navigator.userAgentData.mobile` — the User-Agent Client Hints boolean.
|
|
23
|
+
* Authoritative where implemented (Chromium), in both directions.
|
|
24
|
+
* 2. The PRIMARY pointer (`(pointer: coarse)`) plus a touch digitizer.
|
|
25
|
+
* A phone/tablet reports a coarse primary pointer; a touchscreen laptop
|
|
26
|
+
* still reports its mouse as primary, so it is not misclassified.
|
|
27
|
+
*/
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* The `navigator.userAgentData` slice this module reads. Declared locally
|
|
31
|
+
* because `NavigatorUAData` is not in TypeScript's DOM lib yet; only the one
|
|
32
|
+
* field consumed here is modelled, and it stays optional so an implementation
|
|
33
|
+
* without it is simply "no answer" rather than a type lie.
|
|
34
|
+
*/
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Which surface this app is running on, as `selectCommonsDelivery` models it.
|
|
38
|
+
*
|
|
39
|
+
* - Native (Expo/RN) is always `'mobile'`: it is an Oxy app installed on a
|
|
40
|
+
* phone/tablet, exactly the case where a verified Commons link can resolve
|
|
41
|
+
* on this very device.
|
|
42
|
+
* - A web browser is classified from the signals above.
|
|
43
|
+
* - Anything else — a browser-like environment with neither signal — is
|
|
44
|
+
* `'unknown'`, a first-class value that never opts into the deep link.
|
|
45
|
+
*/
|
|
46
|
+
function resolveDeliveryPlatform() {
|
|
47
|
+
if (!(0, _isWebBrowser.isWebBrowser)()) return 'mobile';
|
|
48
|
+
const nav = typeof navigator === 'undefined' ? undefined : navigator;
|
|
49
|
+
const uaMobile = nav?.userAgentData?.mobile;
|
|
50
|
+
if (typeof uaMobile === 'boolean') return uaMobile ? 'mobile' : 'desktop';
|
|
51
|
+
if (typeof window !== 'undefined' && typeof window.matchMedia === 'function') {
|
|
52
|
+
const coarsePrimaryPointer = window.matchMedia('(pointer: coarse)').matches;
|
|
53
|
+
const hasTouchDigitizer = (nav?.maxTouchPoints ?? 0) > 0;
|
|
54
|
+
return coarsePrimaryPointer && hasTouchDigitizer ? 'mobile' : 'desktop';
|
|
55
|
+
}
|
|
56
|
+
return 'unknown';
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=deliveryPlatform.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_isWebBrowser","require","resolveDeliveryPlatform","isWebBrowser","nav","navigator","undefined","uaMobile","userAgentData","mobile","window","matchMedia","coarsePrimaryPointer","matches","hasTouchDigitizer","maxTouchPoints"],"sourceRoot":"../../../../src","sources":["ui/utils/deliveryPlatform.ts"],"mappings":";;;;;;AAsBA,IAAAA,aAAA,GAAAC,OAAA;AAtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAKA;AACA;AACA;AACA;AACA;AACA;;AASA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,uBAAuBA,CAAA,EAA4B;EACjE,IAAI,CAAC,IAAAC,0BAAY,EAAC,CAAC,EAAE,OAAO,QAAQ;EAEpC,MAAMC,GAA2C,GAC/C,OAAOC,SAAS,KAAK,WAAW,GAAGC,SAAS,GAAGD,SAAS;EAE1D,MAAME,QAAQ,GAAGH,GAAG,EAAEI,aAAa,EAAEC,MAAM;EAC3C,IAAI,OAAOF,QAAQ,KAAK,SAAS,EAAE,OAAOA,QAAQ,GAAG,QAAQ,GAAG,SAAS;EAEzE,IAAI,OAAOG,MAAM,KAAK,WAAW,IAAI,OAAOA,MAAM,CAACC,UAAU,KAAK,UAAU,EAAE;IAC5E,MAAMC,oBAAoB,GAAGF,MAAM,CAACC,UAAU,CAAC,mBAAmB,CAAC,CAACE,OAAO;IAC3E,MAAMC,iBAAiB,GAAG,CAACV,GAAG,EAAEW,cAAc,IAAI,CAAC,IAAI,CAAC;IACxD,OAAOH,oBAAoB,IAAIE,iBAAiB,GAAG,QAAQ,GAAG,SAAS;EACzE;EAEA,OAAO,SAAS;AAClB","ignoreList":[]}
|
|
@@ -7,10 +7,18 @@ exports.consumeHubSyncFailure = consumeHubSyncFailure;
|
|
|
7
7
|
exports.replaceUrlAfterOAuthReturn = replaceUrlAfterOAuthReturn;
|
|
8
8
|
exports.tryCompleteOAuthReturn = tryCompleteOAuthReturn;
|
|
9
9
|
var _core = require("@oxyhq/core");
|
|
10
|
+
var _completeOAuthCode = require("../oauth/completeOAuthCode.js");
|
|
10
11
|
var _isWebBrowser = require("./isWebBrowser.js");
|
|
11
12
|
/**
|
|
12
|
-
* When the RP lands with `?code=` after
|
|
13
|
-
*
|
|
13
|
+
* When the RP lands with `?code=` after signing in at auth.oxy.so, exchange the
|
|
14
|
+
* code for a device-first session before cold boot runs.
|
|
15
|
+
*
|
|
16
|
+
* This is the REDIRECT transport's return leg. It owns only what is specific to
|
|
17
|
+
* a full-page round trip — reading the code off the URL, recovering the
|
|
18
|
+
* handshake `sessionStorage` carried across the navigation, and cleaning both up
|
|
19
|
+
* afterwards — and delegates state validation, the PKCE exchange, and the
|
|
20
|
+
* session commit to `completeOAuthCode`, the same function the popup transport
|
|
21
|
+
* runs.
|
|
14
22
|
*/
|
|
15
23
|
async function tryCompleteOAuthReturn(opts) {
|
|
16
24
|
if (!(0, _isWebBrowser.isWebBrowser)()) return false;
|
|
@@ -21,6 +29,7 @@ async function tryCompleteOAuthReturn(opts) {
|
|
|
21
29
|
const oauthError = params.get('error');
|
|
22
30
|
if (oauthError) {
|
|
23
31
|
stripOAuthParamsFromUrl();
|
|
32
|
+
(0, _core.clearOAuthHandshake)();
|
|
24
33
|
return false;
|
|
25
34
|
}
|
|
26
35
|
if (!code) return false;
|
|
@@ -30,50 +39,26 @@ async function tryCompleteOAuthReturn(opts) {
|
|
|
30
39
|
component: 'oauthReturn'
|
|
31
40
|
});
|
|
32
41
|
stripOAuthParamsFromUrl();
|
|
33
|
-
return false;
|
|
34
|
-
}
|
|
35
|
-
const returnedState = params.get('state');
|
|
36
|
-
const handshake = (0, _core.readOAuthHandshake)();
|
|
37
|
-
if (!handshake || !returnedState || handshake.state !== returnedState) {
|
|
38
|
-
_core.logger.warn('OAuth return ignored: missing or mismatched handshake', {
|
|
39
|
-
component: 'oauthReturn'
|
|
40
|
-
});
|
|
41
|
-
// Consume the return path before clearing the handshake — clearOAuthHandshake
|
|
42
|
-
// drops the persisted path along with the PKCE keys.
|
|
43
|
-
stripOAuthParamsFromUrl();
|
|
44
|
-
(0, _core.clearOAuthHandshake)();
|
|
45
|
-
return false;
|
|
46
|
-
}
|
|
47
|
-
const redirectUri = (0, _core.normalizeOAuthRedirectUri)(opts.authRedirectUri ?? location.origin);
|
|
48
|
-
try {
|
|
49
|
-
const result = await opts.oxyServices.exchangeOAuthCode({
|
|
50
|
-
code,
|
|
51
|
-
clientId,
|
|
52
|
-
redirectUri,
|
|
53
|
-
codeVerifier: handshake.codeVerifier
|
|
54
|
-
});
|
|
55
|
-
// Strip OAuth params before commit so a stale `?code=` cannot re-enter the exchange loop.
|
|
56
|
-
// Read the return path first — clearOAuthHandshake drops it with the PKCE keys.
|
|
57
|
-
stripOAuthParamsFromUrl();
|
|
58
|
-
(0, _core.clearOAuthHandshake)();
|
|
59
|
-
await opts.commitSession({
|
|
60
|
-
sessionId: result.sessionId,
|
|
61
|
-
accessToken: result.accessToken,
|
|
62
|
-
deviceId: result.deviceId,
|
|
63
|
-
deviceSecret: result.deviceSecret,
|
|
64
|
-
userId: result.user.id,
|
|
65
|
-
expiresAt: result.expiresAt,
|
|
66
|
-
user: result.user
|
|
67
|
-
});
|
|
68
|
-
return true;
|
|
69
|
-
} catch (error) {
|
|
70
|
-
_core.logger.warn('OAuth return exchange failed', {
|
|
71
|
-
component: 'oauthReturn'
|
|
72
|
-
}, error);
|
|
73
|
-
stripOAuthParamsFromUrl();
|
|
74
42
|
(0, _core.clearOAuthHandshake)();
|
|
75
43
|
return false;
|
|
76
44
|
}
|
|
45
|
+
const result = await (0, _completeOAuthCode.completeOAuthCode)({
|
|
46
|
+
oxyServices: opts.oxyServices,
|
|
47
|
+
clientId,
|
|
48
|
+
code,
|
|
49
|
+
returnedState: params.get('state'),
|
|
50
|
+
handshake: (0, _core.readOAuthHandshake)(),
|
|
51
|
+
redirectUri: (0, _core.normalizeOAuthRedirectUri)(opts.authRedirectUri ?? location.origin),
|
|
52
|
+
commitSession: opts.commitSession,
|
|
53
|
+
// Strip the params before the commit so a stale `?code=` cannot re-enter the
|
|
54
|
+
// exchange loop, and read the return path FIRST — clearOAuthHandshake drops
|
|
55
|
+
// it along with the PKCE keys.
|
|
56
|
+
cleanup: () => {
|
|
57
|
+
stripOAuthParamsFromUrl();
|
|
58
|
+
(0, _core.clearOAuthHandshake)();
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
return result.ok;
|
|
77
62
|
}
|
|
78
63
|
|
|
79
64
|
/**
|
|
@@ -138,18 +123,15 @@ function stripOAuthParamsFromUrl() {
|
|
|
138
123
|
function consumeHubSyncFailure() {
|
|
139
124
|
if (!(0, _isWebBrowser.isWebBrowser)()) return false;
|
|
140
125
|
const location = globalThis.location;
|
|
141
|
-
const history = globalThis.history;
|
|
142
126
|
if (!location) return false;
|
|
143
127
|
const params = new URLSearchParams(location.search);
|
|
144
128
|
if (params.get('hub_sync') !== 'failed') return false;
|
|
145
129
|
_core.logger.warn('Hub sync failed — IdP device session may be out of sync', {
|
|
146
130
|
component: 'hubSync'
|
|
147
131
|
});
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
history.replaceState(history.state, '', `${url.pathname}${url.search}${url.hash}`);
|
|
152
|
-
}
|
|
132
|
+
const url = new URL(location.href);
|
|
133
|
+
url.searchParams.delete('hub_sync');
|
|
134
|
+
replaceUrlAfterOAuthReturn(`${url.pathname}${url.search}${url.hash}`);
|
|
153
135
|
return true;
|
|
154
136
|
}
|
|
155
137
|
//# sourceMappingURL=oauthReturn.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_core","require","_isWebBrowser","tryCompleteOAuthReturn","opts","isWebBrowser","location","globalThis","params","URLSearchParams","search","code","get","oauthError","stripOAuthParamsFromUrl","clientId","logger","warn","component","
|
|
1
|
+
{"version":3,"names":["_core","require","_completeOAuthCode","_isWebBrowser","tryCompleteOAuthReturn","opts","isWebBrowser","location","globalThis","params","URLSearchParams","search","code","get","oauthError","stripOAuthParamsFromUrl","clearOAuthHandshake","clientId","logger","warn","component","result","completeOAuthCode","oxyServices","returnedState","handshake","readOAuthHandshake","redirectUri","normalizeOAuthRedirectUri","authRedirectUri","origin","commitSession","cleanup","ok","replaceUrlAfterOAuthReturn","fallbackUrl","history","replaceState","current","pathname","hash","target","consumeOAuthReturnPath","state","dispatch","dispatchEvent","event","PopStateEvent","Event","call","error","url","URL","href","searchParams","delete","consum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AAO,KAAK;EAErDK,YAAM,CAACC,IAAI,CAAC,yDAAyD,EAAE;IACrEC,SAAS,EAAE;EACb,CAAC,CAAC;EAEF,MAAM+B,GAAG,GAAG,IAAIC,GAAG,CAAC7C,QAAQ,CAAC8C,IAAI,CAAC;EAClCF,GAAG,CAACG,YAAY,CAACC,MAAM,CAAC,UAAU,CAAC;EACnCrB,0BAA0B,CAAC,GAAGiB,GAAG,CAACZ,QAAQ,GAAGY,GAAG,CAACxC,MAAM,GAAGwC,GAAG,CAACX,IAAI,EAAE,CAAC;EACrE,OAAO,IAAI;AACb","ignoreList":[]}
|
package/lib/module/index.js
CHANGED
|
@@ -36,10 +36,10 @@ setPlatformOS(Platform.OS);
|
|
|
36
36
|
export { default as OxyProvider } from "./ui/components/OxyProvider.js";
|
|
37
37
|
export { useOxy } from "./ui/context/OxyContext.js";
|
|
38
38
|
export { useAuth } from "./ui/hooks/useAuth.js";
|
|
39
|
-
//
|
|
40
|
-
//
|
|
41
|
-
//
|
|
42
|
-
export {
|
|
39
|
+
// Thrown by `switchToAccount` / `switchSession` while `OxyProvider` runs with
|
|
40
|
+
// `sessionMode="identity"` — an identity-bound app authenticates as the owner of
|
|
41
|
+
// the local identity key and cannot switch accounts.
|
|
42
|
+
export { IdentityBoundSessionError } from "./ui/session/identityBinding.js";
|
|
43
43
|
|
|
44
44
|
// ---------------------------------------------------------------------------
|
|
45
45
|
// Zustand stores
|
|
@@ -103,10 +103,24 @@ export { handleAuthError, isInvalidSessionError, isTimeoutOrNetworkError, extrac
|
|
|
103
103
|
// ---------------------------------------------------------------------------
|
|
104
104
|
export { useFileFiltering } from "./ui/hooks/useFileFiltering.js";
|
|
105
105
|
// ---------------------------------------------------------------------------
|
|
106
|
+
// Device notifications (the ONE `expo-notifications` adapter)
|
|
107
|
+
// ---------------------------------------------------------------------------
|
|
108
|
+
// The Expo-side half of push: permission, platform tag, and the EXPO push token
|
|
109
|
+
// `@oxyhq/core`'s `registerPushToken` accepts (never a raw APNs/FCM token).
|
|
110
|
+
// Native-only by construction — every entry point resolves its null/no-op result
|
|
111
|
+
// from `Platform.OS` before `expo-notifications` is ever imported, and both
|
|
112
|
+
// `expo-notifications` and `expo-constants` are OPTIONAL peers.
|
|
113
|
+
export { pushTokenPlatform, hasNotificationPermission, requestNotificationPermission, getExpoPushToken, takeLaunchNotificationData, installForegroundNotificationHandler, subscribeToNotificationResponses } from "./notifications/deviceNotifications.js";
|
|
114
|
+
// ---------------------------------------------------------------------------
|
|
106
115
|
// UI components
|
|
107
116
|
// ---------------------------------------------------------------------------
|
|
108
117
|
export { OXY_OAUTH_STATE_STORAGE_KEY, OXY_OAUTH_CODE_VERIFIER_STORAGE_KEY } from '@oxyhq/core';
|
|
109
118
|
export { default as OxySignInButton } from "./ui/components/OxySignInButton.js";
|
|
119
|
+
// Web OAuth transport (popup / redirect). RPs that ship their own sign-in
|
|
120
|
+
// button call `useOxy().startWebOAuthSignIn(...)`; only the popup opener is
|
|
121
|
+
// exported, because it MUST run synchronously inside the press handler to keep
|
|
122
|
+
// the browser's user-gesture attribution.
|
|
123
|
+
export { openOAuthPopup } from "./ui/oauth/oauthPopup.js";
|
|
110
124
|
export { OxyAuthPrompt } from "./ui/components/OxyAuthPrompt.js";
|
|
111
125
|
export { OxyOAuthCallback } from "./ui/components/OxyOAuthCallback.js";
|
|
112
126
|
export { OxyConsentScreen } from "./ui/components/OxyConsentScreen.js";
|
|
@@ -131,6 +145,15 @@ export { default as ProfileButton } from "./ui/components/ProfileButton.js";
|
|
|
131
145
|
// host (e.g. a future auth.oxy.so hub page) can mount the exact same chooser
|
|
132
146
|
// with its own completion strategy.
|
|
133
147
|
export { default as OxyAuthChooser } from "./ui/components/OxyAuthChooser.js";
|
|
148
|
+
// The in-flight "Sign in with Oxy" REQUEST surface — the route's primary visual,
|
|
149
|
+
// the progress line, and the "Having trouble?" alternatives — as a purely
|
|
150
|
+
// presentational component driven by plain facts. `OxyAuthChooser` renders it
|
|
151
|
+
// from `AccountDialogController`'s device flow; a host with a request of its own
|
|
152
|
+
// (the auth.oxy.so IdP's OAuth-bound lane) renders the SAME component from its
|
|
153
|
+
// own facts, so there is one implementation of this surface, not two. It needs
|
|
154
|
+
// no controller: `route` + `progress` + `qrPayload` + the failure flags are the
|
|
155
|
+
// whole contract, and none of them is a secret credential.
|
|
156
|
+
export { OxySignInRequestSurface } from "./ui/components/OxySignInRequestSurface.js";
|
|
134
157
|
// Unified switchable-accounts hook — the single source of everything the user
|
|
135
158
|
// can switch into: device sign-ins AND linked graph accounts (owned orgs +
|
|
136
159
|
// shared-with-you), deduped by account id and hydrated with real
|