@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,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import { logger as loggerUtil } from '@oxyhq/core';
|
|
4
|
+
import { allowsAutomaticIdpRedirect } from "../oauth/legacyRedirectLanes.js";
|
|
5
|
+
import { isWebBrowser } from "../utils/isWebBrowser.js";
|
|
4
6
|
import { isUnauthorizedStatus } from "./oxyContextHelpers.js";
|
|
5
7
|
const LOG_CONTEXT = {
|
|
6
8
|
component: 'OxyContext',
|
|
@@ -94,4 +96,44 @@ export async function commitDeviceSetAndResolve(deps) {
|
|
|
94
96
|
await hydrateAndResolve();
|
|
95
97
|
void reconcileDeviceSet().catch(logReconcileError);
|
|
96
98
|
}
|
|
99
|
+
/**
|
|
100
|
+
* Post-sign-in hub sync: plant this device's credential on the IdP hub so OTHER
|
|
101
|
+
* official origins can silently restore a session on their next cold boot.
|
|
102
|
+
*
|
|
103
|
+
* The tail of the ONE commit funnel (`commitSession`), extracted so every gate
|
|
104
|
+
* on this legacy lane lives — and is tested — in one place. Returns whether the
|
|
105
|
+
* full-page redirect was started; a failure is non-fatal and never propagates
|
|
106
|
+
* (the sign-in itself already succeeded).
|
|
107
|
+
*
|
|
108
|
+
* Four gates, all of which must pass:
|
|
109
|
+
* 1. `activate` — only a deliberate sign-in syncs; a cold-boot restore never does.
|
|
110
|
+
* 2. `hubSyncRequested` — the in-place lanes (account switch, popup OAuth) opt out.
|
|
111
|
+
* 3. `hubSyncEnabled` — the provider-level `hubSync` prop.
|
|
112
|
+
* 4. `allowsAutomaticIdpRedirect(webAuthMode)` — hub sync REPLACES the document
|
|
113
|
+
* with `auth.oxy.so`, so `webAuthMode: 'popup'` forbids it: a redirect that
|
|
114
|
+
* bounces the tab defeats the entire point of the mode, no matter which
|
|
115
|
+
* commit path produced the session (issue #691, "Cold boot and cross-domain
|
|
116
|
+
* behavior"). Redirect mode — the default and the compatibility path — is
|
|
117
|
+
* unchanged, and this whole function disappears with it in phase 7b.
|
|
118
|
+
*/
|
|
119
|
+
export async function maybeSyncHubAfterCommit(deps) {
|
|
120
|
+
const {
|
|
121
|
+
activate,
|
|
122
|
+
hubSyncRequested,
|
|
123
|
+
hubSyncEnabled,
|
|
124
|
+
webAuthMode,
|
|
125
|
+
syncHub
|
|
126
|
+
} = deps;
|
|
127
|
+
if (!activate || !hubSyncRequested || !hubSyncEnabled) return false;
|
|
128
|
+
if (!allowsAutomaticIdpRedirect(webAuthMode)) return false;
|
|
129
|
+
if (!isWebBrowser()) return false;
|
|
130
|
+
try {
|
|
131
|
+
return await syncHub();
|
|
132
|
+
} catch (hubError) {
|
|
133
|
+
if (__DEV__) {
|
|
134
|
+
loggerUtil.debug('Hub sync after sign-in failed (non-fatal)', LOG_CONTEXT, hubError);
|
|
135
|
+
}
|
|
136
|
+
return false;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
97
139
|
//# sourceMappingURL=commitSessionFlow.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["logger","loggerUtil","isUnauthorizedStatus","LOG_CONTEXT","component","method","commitDeviceSetAndResolve","deps","activate","userId","fallbackUser","registerAndActivate","addCurrentAccount","startSocket","syncFromClient","getCurrentUser","loginSuccess","onAuthStateChange","markAuthResolved","reconcileDeviceSet","logReconcileError","registrationError","debug","warn","hydrateAndResolve","fullUser","profileError","__DEV__","catch"],"sourceRoot":"../../../../src","sources":["ui/context/commitSessionFlow.ts"],"mappings":";;AACA,SAASA,MAAM,IAAIC,UAAU,QAAQ,aAAa;AAClD,SAASC,oBAAoB,QAAQ,wBAAqB;AAE1D,MAAMC,WAAW,GAAG;EAAEC,SAAS,EAAE,YAAY;EAAEC,MAAM,EAAE;AAAgB,CAAU;AA6BjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,eAAeC,yBAAyBA,CAC7CC,IAAmC,EACpB;EACf,MAAM;IACJC,QAAQ;IACRC,MAAM;IACNC,YAAY;IACZC,mBAAmB;IACnBC,iBAAiB;IACjBC,WAAW;IACXC,cAAc;IACdC,cAAc;IACdC,YAAY;IACZC,iBAAiB;IACjBC;EACF,CAAC,GAAGX,IAAI;;EAER;EACA;EACA;EACA;EACA,MAAMY,kBAAkB,GAAG,MAAAA,CAAA,KAA2B;IACpD,IAAIX,QAAQ,EAAE;MACZ,MAAMG,mBAAmB,CAACF,MAAM,CAAC;IACnC,CAAC,MAAM;MACL,MAAMG,iBAAiB,CAAC,CAAC;IAC3B;IACA,MAAMC,WAAW,CAAC,CAAC;IACnB,MAAMC,cAAc,CAAC,CAAC;EACxB,CAAC;EAED,MAAMM,iBAAiB,GAAIC,iBAA0B,IAAW;IAC9D;IACA;IACA;IACA;IACA;IACA,IAAInB,oBAAoB,CAACmB,iBAAiB,CAAC,EAAE;
|
|
1
|
+
{"version":3,"names":["logger","loggerUtil","allowsAutomaticIdpRedirect","isWebBrowser","isUnauthorizedStatus","LOG_CONTEXT","component","method","commitDeviceSetAndResolve","deps","activate","userId","fallbackUser","registerAndActivate","addCurrentAccount","startSocket","syncFromClient","getCurrentUser","loginSuccess","onAuthStateChange","markAuthResolved","reconcileDeviceSet","logReconcileError","registrationError","debug","warn","hydrateAndResolve","fullUser","profileError","__DEV__","catch","maybeSyncHubAfterCommit","hubSyncRequested","hubSyncEnabled","webAuthMode","syncHub","hubError"],"sourceRoot":"../../../../src","sources":["ui/context/commitSessionFlow.ts"],"mappings":";;AACA,SAASA,MAAM,IAAIC,UAAU,QAAQ,aAAa;AAClD,SAASC,0BAA0B,QAAQ,iCAA8B;AAEzE,SAASC,YAAY,QAAQ,0BAAuB;AACpD,SAASC,oBAAoB,QAAQ,wBAAqB;AAE1D,MAAMC,WAAW,GAAG;EAAEC,SAAS,EAAE,YAAY;EAAEC,MAAM,EAAE;AAAgB,CAAU;AA6BjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,eAAeC,yBAAyBA,CAC7CC,IAAmC,EACpB;EACf,MAAM;IACJC,QAAQ;IACRC,MAAM;IACNC,YAAY;IACZC,mBAAmB;IACnBC,iBAAiB;IACjBC,WAAW;IACXC,cAAc;IACdC,cAAc;IACdC,YAAY;IACZC,iBAAiB;IACjBC;EACF,CAAC,GAAGX,IAAI;;EAER;EACA;EACA;EACA;EACA,MAAMY,kBAAkB,GAAG,MAAAA,CAAA,KAA2B;IACpD,IAAIX,QAAQ,EAAE;MACZ,MAAMG,mBAAmB,CAACF,MAAM,CAAC;IACnC,CAAC,MAAM;MACL,MAAMG,iBAAiB,CAAC,CAAC;IAC3B;IACA,MAAMC,WAAW,CAAC,CAAC;IACnB,MAAMC,cAAc,CAAC,CAAC;EACxB,CAAC;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,IAAiC,EACf;EAClB,MAAM;IAAEC,QAAQ;IAAEsB,gBAAgB;IAAEC,cAAc;IAAEC,WAAW;IAAEC;EAAQ,CAAC,GAAG1B,IAAI;EAEjF,IAAI,CAACC,QAAQ,IAAI,CAACsB,gBAAgB,IAAI,CAACC,cAAc,EAAE,OAAO,KAAK;EACnE,IAAI,CAAC/B,0BAA0B,CAACgC,WAAW,CAAC,EAAE,OAAO,KAAK;EAC1D,IAAI,CAAC/B,YAAY,CAAC,CAAC,EAAE,OAAO,KAAK;EAEjC,IAAI;IACF,OAAO,MAAMgC,OAAO,CAAC,CAAC;EACxB,CAAC,CAAC,OAAOC,QAAQ,EAAE;IACjB,IAAIP,OAAO,EAAE;MACX5B,UAAU,CAACuB,KAAK,CAAC,2CAA2C,EAAEnB,WAAW,EAAE+B,QAAQ,CAAC;IACtF;IACA,OAAO,KAAK;EACd;AACF","ignoreList":[]}
|
|
@@ -5,10 +5,12 @@ import { logger as loggerUtil } from '@oxyhq/core';
|
|
|
5
5
|
import { isUnauthorizedStatus } from "./oxyContextHelpers.js";
|
|
6
6
|
import { resetSessionScopedStores } from "../stores/resetSessionScopedStores.js";
|
|
7
7
|
import { ASSET_DOWNLOAD_URLS_QUERY_KEY } from "../hooks/useResolvedFileUrls.js";
|
|
8
|
+
import { IdentityBoundSessionError } from "../session/index.js";
|
|
8
9
|
export function useOxyAccountGraph({
|
|
9
10
|
isAuthenticated,
|
|
10
11
|
tokenReady,
|
|
11
12
|
initialized,
|
|
13
|
+
identityBound,
|
|
12
14
|
oxyServices,
|
|
13
15
|
sessionClient,
|
|
14
16
|
syncFromClient,
|
|
@@ -19,7 +21,7 @@ export function useOxyAccountGraph({
|
|
|
19
21
|
}) {
|
|
20
22
|
const [accounts, setAccounts] = useState([]);
|
|
21
23
|
const refreshAccounts = useCallback(async () => {
|
|
22
|
-
if (!isAuthenticated || !tokenReady || !oxyServices.getAccessToken()) {
|
|
24
|
+
if (identityBound || !isAuthenticated || !tokenReady || !oxyServices.getAccessToken()) {
|
|
23
25
|
setAccounts([]);
|
|
24
26
|
return;
|
|
25
27
|
}
|
|
@@ -38,13 +40,13 @@ export function useOxyAccountGraph({
|
|
|
38
40
|
}, err);
|
|
39
41
|
}
|
|
40
42
|
}
|
|
41
|
-
}, [isAuthenticated, oxyServices, tokenReady, clearSessionStateRef]);
|
|
43
|
+
}, [identityBound, isAuthenticated, oxyServices, tokenReady, clearSessionStateRef]);
|
|
42
44
|
useEffect(() => {
|
|
43
|
-
if (isAuthenticated && initialized && tokenReady) {
|
|
45
|
+
if (!identityBound && isAuthenticated && initialized && tokenReady) {
|
|
44
46
|
refreshAccounts();
|
|
45
47
|
void accountDialogControllerRef.current?.refresh();
|
|
46
48
|
}
|
|
47
|
-
}, [isAuthenticated, initialized, tokenReady, refreshAccounts, accountDialogControllerRef]);
|
|
49
|
+
}, [identityBound, isAuthenticated, initialized, tokenReady, refreshAccounts, accountDialogControllerRef]);
|
|
48
50
|
const runPostAccountSwitchSideEffects = useCallback(async () => {
|
|
49
51
|
resetSessionScopedStores();
|
|
50
52
|
// Scoped media tokens are per-viewer — drop any cached URLs immediately so
|
|
@@ -57,6 +59,12 @@ export function useOxyAccountGraph({
|
|
|
57
59
|
queryClient.invalidateQueries();
|
|
58
60
|
}, [refreshAccounts, queryClient]);
|
|
59
61
|
const switchToAccount = useCallback(async accountId => {
|
|
62
|
+
if (identityBound) {
|
|
63
|
+
// Loud rejection, never a silent no-op: a resolved promise here would
|
|
64
|
+
// read to the caller as a completed switch that simply left the user
|
|
65
|
+
// unchanged, which is exactly the confusion this mode must avoid.
|
|
66
|
+
throw new IdentityBoundSessionError('switchToAccount');
|
|
67
|
+
}
|
|
60
68
|
const deviceState = sessionClient.getState();
|
|
61
69
|
if (deviceState?.accounts.some(account => account.accountId === accountId)) {
|
|
62
70
|
await sessionClient.switchAccount(accountId);
|
|
@@ -84,7 +92,7 @@ export function useOxyAccountGraph({
|
|
|
84
92
|
hubSync: false
|
|
85
93
|
});
|
|
86
94
|
await runPostAccountSwitchSideEffects();
|
|
87
|
-
}, [oxyServices, sessionClient, syncFromClient, commitSession, runPostAccountSwitchSideEffects]);
|
|
95
|
+
}, [identityBound, oxyServices, sessionClient, syncFromClient, commitSession, runPostAccountSwitchSideEffects]);
|
|
88
96
|
const createAccount = useCallback(async data => {
|
|
89
97
|
const account = await oxyServices.createAccount(data);
|
|
90
98
|
await refreshAccounts();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useCallback","useEffect","useState","logger","loggerUtil","isUnauthorizedStatus","resetSessionScopedStores","ASSET_DOWNLOAD_URLS_QUERY_KEY","useOxyAccountGraph","isAuthenticated","tokenReady","initialized","oxyServices","sessionClient","syncFromClient","commitSession","queryClient","accountDialogControllerRef","clearSessionStateRef","accounts","setAccounts","refreshAccounts","getAccessToken","list","listAccounts","err","current","__DEV__","debug","component","refresh","runPostAccountSwitchSideEffects","removeQueries","queryKey","invalidateQueries","switchToAccount","accountId","deviceState","getState","some","account","switchAccount","result","user","sessionId","Error","accessToken","deviceSecret","deviceId","expiresAt","userId","id","activate","hubSync","createAccount","data"],"sourceRoot":"../../../../src","sources":["ui/context/useOxyAccountGraph.ts"],"mappings":";;AAAA,SAASA,WAAW,EAAEC,SAAS,EAAEC,QAAQ,QAAwB,OAAO;AAGxE,SAASC,MAAM,IAAIC,UAAU,QAAQ,aAAa;AAElD,SAASC,oBAAoB,QAAQ,wBAAqB;AAC1D,SAASC,wBAAwB,QAAQ,uCAAoC;AAC7E,SAASC,6BAA6B,QAAQ,iCAA8B;
|
|
1
|
+
{"version":3,"names":["useCallback","useEffect","useState","logger","loggerUtil","isUnauthorizedStatus","resetSessionScopedStores","ASSET_DOWNLOAD_URLS_QUERY_KEY","IdentityBoundSessionError","useOxyAccountGraph","isAuthenticated","tokenReady","initialized","identityBound","oxyServices","sessionClient","syncFromClient","commitSession","queryClient","accountDialogControllerRef","clearSessionStateRef","accounts","setAccounts","refreshAccounts","getAccessToken","list","listAccounts","err","current","__DEV__","debug","component","refresh","runPostAccountSwitchSideEffects","removeQueries","queryKey","invalidateQueries","switchToAccount","accountId","deviceState","getState","some","account","switchAccount","result","user","sessionId","Error","accessToken","deviceSecret","deviceId","expiresAt","userId","id","activate","hubSync","createAccount","data"],"sourceRoot":"../../../../src","sources":["ui/context/useOxyAccountGraph.ts"],"mappings":";;AAAA,SAASA,WAAW,EAAEC,SAAS,EAAEC,QAAQ,QAAwB,OAAO;AAGxE,SAASC,MAAM,IAAIC,UAAU,QAAQ,aAAa;AAElD,SAASC,oBAAoB,QAAQ,wBAAqB;AAC1D,SAASC,wBAAwB,QAAQ,uCAAoC;AAC7E,SAASC,6BAA6B,QAAQ,iCAA8B;AAC5E,SAASC,yBAAyB,QAAQ,qBAAY;AAsBtD,OAAO,SAASC,kBAAkBA,CAAC;EACjCC,eAAe;EACfC,UAAU;EACVC,WAAW;EACXC,aAAa;EACbC,WAAW;EACXC,aAAa;EACbC,cAAc;EACdC,aAAa;EACbC,WAAW;EACXC,0BAA0B;EAC1BC;AACwB,CAAC,EAAE;EAC3B,MAAM,CAACC,QAAQ,EAAEC,WAAW,CAAC,GAAGpB,QAAQ,CAAgB,EAAE,CAAC;EAE3D,MAAMqB,eAAe,GAAGvB,WAAW,CAAC,YAA2B;IAC7D,IAAIa,aAAa,IAAI,CAACH,eAAe,IAAI,CAACC,UAAU,IAAI,CAACG,WAAW,CAACU,cAAc,CAAC,CAAC,EAAE;MACrFF,WAAW,CAAC,EAAE,CAAC;MACf;IACF;IACA,IAAI;MACF,MAAMG,IAAI,GAAG,MAAMX,WAAW,CAACY,YAAY,CAAC,CAAC;MAC7CJ,WAAW,CAACG,IAAI,CAAC;IACnB,CAAC,CAAC,OAAOE,GAAG,EAAE;MACZ,IAAItB,oBAAoB,CAACsB,GAAG,CAAC,EAAE;QAC7BL,WAAW,CAAC,EAAE,CAAC;QACf,MAAMF,oBAAoB,CAACQ,OAAO,CAAC,CAAC;QACpC;MACF;MACA,IAAIC,OAAO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expiresAt: null,
|
|
21
|
-
error: null
|
|
21
|
+
error: null,
|
|
22
|
+
route: null,
|
|
23
|
+
routeFailed: false,
|
|
24
|
+
pushSentAt: null,
|
|
25
|
+
openedAt: null,
|
|
26
|
+
progress: 'idle'
|
|
22
27
|
},
|
|
23
28
|
commonsAvailability: 'unknown'
|
|
24
29
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useCallback","useMemo","useSyncExternalStore","useOxy","EMPTY_SNAPSHOT","view","accounts","activeAccountId","loading","error","switchingAccountId","signIn","phase","authorizeCode","qrPayload","expiresAt","commonsAvailability","useSwitchableAccounts","accountDialogController","controller","subscribe","listener","undefined","getSnapshot","snapshot","currentSessionId","active","find","account","accountId","sessionId","isLoading"],"sourceRoot":"../../../../src","sources":["ui/hooks/useSwitchableAccounts.ts"],"mappings":";;AAAA,SAASA,WAAW,EAAEC,OAAO,EAAEC,oBAAoB,QAAQ,OAAO;AAElE,SAASC,MAAM,QAAQ,0BAAuB;AAW9C;AACA;AACA;AACA;AACA,MAAMC,cAAqC,GAAG;EAC1CC,IAAI,EAAE,UAAU;EAChBC,QAAQ,EAAE,EAAE;EACZC,eAAe,EAAE,IAAI;EACrBC,OAAO,EAAE,KAAK;EACdC,KAAK,EAAE,IAAI;EACXC,kBAAkB,EAAE,IAAI;EACxBC,MAAM,EAAE;
|
|
1
|
+
{"version":3,"names":["useCallback","useMemo","useSyncExternalStore","useOxy","EMPTY_SNAPSHOT","view","accounts","activeAccountId","loading","error","switchingAccountId","signIn","phase","authorizeCode","qrPayload","expiresAt","route","routeFailed","pushSentAt","openedAt","progress","commonsAvailability","useSwitchableAccounts","accountDialogController","controller","subscribe","listener","undefined","getSnapshot","snapshot","currentSessionId","active","find","account","accountId","sessionId","isLoading"],"sourceRoot":"../../../../src","sources":["ui/hooks/useSwitchableAccounts.ts"],"mappings":";;AAAA,SAASA,WAAW,EAAEC,OAAO,EAAEC,oBAAoB,QAAQ,OAAO;AAElE,SAASC,MA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Q,CAACtB,eAAe,CAAC;IAClG,OAAOwB,MAAM,EAAEI,SAAS,IAAI,IAAI;EACpC,CAAC,EAAE,CAACN,QAAQ,CAAC,CAAC;EAEd,OAAO;IACHvB,QAAQ,EAAEuB,QAAQ,CAACvB,QAAQ;IAC3B8B,SAAS,EAAEP,QAAQ,CAACrB,OAAO;IAC3BsB;EACJ,CAAC;AACL","ignoreList":[]}
|
package/lib/module/ui/index.js
CHANGED
|
@@ -26,7 +26,6 @@ export { LogoText } from "./components/logo/LogoText.js";
|
|
|
26
26
|
export { RequireOxyAuth } from "./components/RequireOxyAuth.js";
|
|
27
27
|
export { default as FollowButton } from "./components/FollowButton.js";
|
|
28
28
|
export { default as OxyPayButton } from "./components/OxyPayButton.js";
|
|
29
|
-
export { FontLoader, setupFonts } from './components/FontLoader';
|
|
30
29
|
export { default as ProfileButton } from "./components/ProfileButton.js";
|
|
31
30
|
|
|
32
31
|
// Context + hooks
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["default","OxyProvider","OxySignInButton","OxyAuthPrompt","LogoIcon","LogoText","RequireOxyAuth","FollowButton","OxyPayButton","
|
|
1
|
+
{"version":3,"names":["default","OxyProvider","OxySignInButton","OxyAuthPrompt","LogoIcon","LogoText","RequireOxyAuth","FollowButton","OxyPayButton","ProfileButton","useOxy","useAuth","useFollow","useSeedFollowStatuses","useStorage","ProfileScreen","ManageAccountScreen","CreateAccountScreen","AccountMembersScreen","AccountSettingsScreen","useAuthStore","useAccountStore","handleAuthError","isInvalidSessionError","isTimeoutOrNetworkError","extractErrorMessage"],"sourceRoot":"../../../src","sources":["ui/index.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,SAASA,OAAO,IAAIC,WAAW,QAAQ,6BAA0B;AACjE,SAASD,OAAO,IAAIE,eAAe,QAAQ,iCAA8B;AACzE,SAASF,OAAO,IAAIG,aAAa,QAAQ,+BAA4B;AAErE,SAASC,QAAQ,QAAQ,+BAA4B;AACrD,SAASC,QAAQ,QAAQ,+BAA4B;AACrD,SAASC,cAAc,QAAQ,gCAA6B;AAE5D,SAASN,OAAO,IAAIO,YAAY,QAAQ,8BAA2B;AACnE,SAASP,OAAO,IAAIQ,YAAY,QAAQ,8BAA2B;AACnE,SAASR,OAAO,IAAIS,aAAa,QAAQ,+BAA4B;;AAErE;AACA,SAASC,MAAM,QAAQ,yBAAsB;AAC7C,SAASC,OAAO,QAAQ,oBAAiB;AACzC,SAASC,SAAS,EAAEC,qBAAqB,QAAQ,sBAAmB;AACpE,SAASC,UAAU,QAAQ,uBAAoB;AAG/C;AACA,SAASd,OAAO,IAAIe,aAAa,QAAQ,4BAAyB;AAClE,SAASf,OAAO,IAAIgB,mBAAmB,QAAQ,kCAA+B;AAC9E,SAAShB,OAAO,IAAIiB,mBAAmB,QAAQ,kCAA+B;AAC9E,SAASjB,OAAO,IAAIkB,oBAAoB,QAAQ,mCAAgC;AAChF,SAASlB,OAAO,IAAImB,qBAAqB,QAAQ,oCAAiC;;AAElF;AACA,SAASC,YAAY,QAAQ,uBAAoB;AACjD,SAASC,eAAe,QAAQ,0BAAuB;;AAEvD;AACA,SACIC,eAAe,EACfC,qBAAqB,EACrBC,uBAAuB,EACvBC,mBAAmB,QAChB,0BAAuB","ignoreList":[]}
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The single web entry point for third-party "Sign in with Oxy".
|
|
5
|
+
*
|
|
6
|
+
* Picks the transport (`popup` or `redirect`), drives it, and returns ONE typed
|
|
7
|
+
* result — so callers (`OxySignInButton`, and any RP with its own button) never
|
|
8
|
+
* touch `window.open`, `postMessage`, or the token exchange themselves.
|
|
9
|
+
*
|
|
10
|
+
* Popup mode keeps the relying party mounted: its route, scroll position, and
|
|
11
|
+
* unsaved state survive because the tab never navigates. Redirect mode is the
|
|
12
|
+
* compatibility fallback, and is also where popup mode lands when the browser
|
|
13
|
+
* blocks the window — a blocked popup must still sign the user in, not dead-end.
|
|
14
|
+
*
|
|
15
|
+
* Native is NOT handled here: `openAuthorizeUrlNative` (an in-app auth session)
|
|
16
|
+
* remains the native lane and is untouched by this module.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
import { logger, persistOAuthHandshake } from '@oxyhq/core';
|
|
20
|
+
import { redirectToAuthorize } from "../components/oauthNavigation.js";
|
|
21
|
+
import { isWebBrowser } from "../utils/isWebBrowser.js";
|
|
22
|
+
import { completeOAuthCode } from "./completeOAuthCode.js";
|
|
23
|
+
import { prepareAuthorizeRequest } from "./oauthHandshake.js";
|
|
24
|
+
import { awaitOAuthPopupResult, closeOAuthPopup, navigateOAuthPopup, openOAuthPopup } from "./oauthPopup.js";
|
|
25
|
+
|
|
26
|
+
/** Provider-owned wiring for a web sign-in — everything that is not per-press. */
|
|
27
|
+
|
|
28
|
+
/** Per-press inputs for {@link startWebOAuthSignIn}. */
|
|
29
|
+
|
|
30
|
+
export async function startWebOAuthSignIn(context, options) {
|
|
31
|
+
if (!isWebBrowser()) {
|
|
32
|
+
closeOAuthPopup(options.popup ?? null);
|
|
33
|
+
return {
|
|
34
|
+
status: 'unsupported',
|
|
35
|
+
reason: 'no-browser'
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
if (context.identityBound) {
|
|
39
|
+
closeOAuthPopup(options.popup ?? null);
|
|
40
|
+
return {
|
|
41
|
+
status: 'unsupported',
|
|
42
|
+
reason: 'identity-bound'
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
if (!context.clientId) {
|
|
46
|
+
closeOAuthPopup(options.popup ?? null);
|
|
47
|
+
return {
|
|
48
|
+
status: 'unsupported',
|
|
49
|
+
reason: 'missing-client-id'
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// Claim the window BEFORE the first `await` below, so a caller that invoked us
|
|
54
|
+
// straight from the click still has gesture attribution. An explicit `null`
|
|
55
|
+
// means the caller already tried and was blocked.
|
|
56
|
+
const popup = context.mode === 'popup' && options.popup === undefined ? openOAuthPopup() : options.popup ?? null;
|
|
57
|
+
if (context.mode === 'redirect') {
|
|
58
|
+
closeOAuthPopup(popup);
|
|
59
|
+
return startRedirectSignIn(context, options, 'redirect-mode');
|
|
60
|
+
}
|
|
61
|
+
if (!popup) {
|
|
62
|
+
logger.warn('OAuth sign-in popup was blocked; falling back to a full-page redirect', {
|
|
63
|
+
component: 'browserAuthTransport'
|
|
64
|
+
});
|
|
65
|
+
return startRedirectSignIn(context, options, 'popup-blocked');
|
|
66
|
+
}
|
|
67
|
+
const prepared = await prepareAuthorizeRequest({
|
|
68
|
+
clientId: context.clientId,
|
|
69
|
+
redirectUri: options.redirectUri,
|
|
70
|
+
authorizeBaseUrl: context.authorizeBaseUrl,
|
|
71
|
+
scope: options.scope,
|
|
72
|
+
responseMode: 'web_message'
|
|
73
|
+
});
|
|
74
|
+
if (!navigateOAuthPopup(popup, prepared.authorizeUrl)) {
|
|
75
|
+
closeOAuthPopup(popup);
|
|
76
|
+
return startRedirectSignIn(context, options, 'popup-navigation-failed');
|
|
77
|
+
}
|
|
78
|
+
const outcome = await awaitOAuthPopupResult({
|
|
79
|
+
popup,
|
|
80
|
+
expectedOrigin: prepared.authorizeOrigin,
|
|
81
|
+
expectedState: prepared.handshake.state,
|
|
82
|
+
...(options.timeoutMs !== undefined ? {
|
|
83
|
+
timeoutMs: options.timeoutMs
|
|
84
|
+
} : {})
|
|
85
|
+
});
|
|
86
|
+
// The IdP closes itself after delivering; this covers every other outcome
|
|
87
|
+
// (timeout, mismatch, an error the IdP reported before closing).
|
|
88
|
+
closeOAuthPopup(popup);
|
|
89
|
+
switch (outcome.kind) {
|
|
90
|
+
case 'code':
|
|
91
|
+
{
|
|
92
|
+
const completion = await completeOAuthCode({
|
|
93
|
+
oxyServices: context.oxyServices,
|
|
94
|
+
clientId: context.clientId,
|
|
95
|
+
code: outcome.code,
|
|
96
|
+
returnedState: outcome.state,
|
|
97
|
+
handshake: prepared.handshake,
|
|
98
|
+
redirectUri: options.redirectUri,
|
|
99
|
+
commitSession: context.commitSession
|
|
100
|
+
});
|
|
101
|
+
return completion.ok ? {
|
|
102
|
+
status: 'signed-in'
|
|
103
|
+
} : {
|
|
104
|
+
status: 'failed',
|
|
105
|
+
reason: completion.reason
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
case 'oauth-error':
|
|
109
|
+
return {
|
|
110
|
+
status: 'failed',
|
|
111
|
+
reason: 'idp-error',
|
|
112
|
+
description: outcome.errorDescription ?? outcome.error
|
|
113
|
+
};
|
|
114
|
+
case 'state-mismatch':
|
|
115
|
+
return {
|
|
116
|
+
status: 'failed',
|
|
117
|
+
reason: 'state-mismatch'
|
|
118
|
+
};
|
|
119
|
+
case 'closed':
|
|
120
|
+
return {
|
|
121
|
+
status: 'cancelled'
|
|
122
|
+
};
|
|
123
|
+
case 'timed-out':
|
|
124
|
+
return {
|
|
125
|
+
status: 'timed-out'
|
|
126
|
+
};
|
|
127
|
+
case 'unsupported':
|
|
128
|
+
return {
|
|
129
|
+
status: 'unsupported',
|
|
130
|
+
reason: 'no-browser'
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Full-page hand-off to the IdP. The document is destroyed by the navigation, so
|
|
137
|
+
* the handshake MUST reach `sessionStorage` first — without it the return trip
|
|
138
|
+
* cannot validate `state`, and starting the redirect anyway would strand the
|
|
139
|
+
* user at a callback that can only refuse them.
|
|
140
|
+
*/
|
|
141
|
+
async function startRedirectSignIn(context, options, via) {
|
|
142
|
+
// Narrowed by the caller; repeated here so this helper is safe on its own.
|
|
143
|
+
if (!context.clientId) return {
|
|
144
|
+
status: 'unsupported',
|
|
145
|
+
reason: 'missing-client-id'
|
|
146
|
+
};
|
|
147
|
+
const prepared = await prepareAuthorizeRequest({
|
|
148
|
+
clientId: context.clientId,
|
|
149
|
+
redirectUri: options.redirectUri,
|
|
150
|
+
authorizeBaseUrl: context.authorizeBaseUrl,
|
|
151
|
+
scope: options.scope
|
|
152
|
+
});
|
|
153
|
+
if (!persistOAuthHandshake(prepared.handshake.state, prepared.handshake.codeVerifier)) {
|
|
154
|
+
return {
|
|
155
|
+
status: 'failed',
|
|
156
|
+
reason: 'handshake-storage'
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
redirectToAuthorize(prepared.authorizeUrl);
|
|
160
|
+
return {
|
|
161
|
+
status: 'redirecting',
|
|
162
|
+
via
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
//# sourceMappingURL=browserAuthTransport.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["logger","persistOAuthHandshake","redirectToAuthorize","isWebBrowser","completeOAuthCode","prepareAuthorizeRequest","awaitOAuthPopupResult","closeOAuthPopup","navigateOAuthPopup","openOAuthPopup","startWebOAuthSignIn","context","options","popup","status","reason","identityBound","clientId","mode","undefined","startRedirectSignIn","warn","component","prepared","redirectUri","authorizeBaseUrl","scope","responseMode","authorizeUrl","outcome","expectedOrigin","authorizeOrigin","expectedState","handshake","state","timeoutMs","kind","completion","oxyServices","code","returnedState","commitSession","ok","description","errorDescription","error","via","codeVerifier"],"sourceRoot":"../../../../src","sources":["ui/oauth/browserAuthTransport.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,MAAM,EAAEC,qBAAqB,QAAQ,aAAa;AAE3D,SAASC,mBAAmB,QAAQ,kCAA+B;AACnE,SAASC,YAAY,QAAQ,0BAAuB;AACpD,SAASC,iBAAiB,QAAQ,wBAAqB;AACvD,SAASC,uBAAuB,QAAQ,qBAAkB;AAC1D,SAASC,qBAAqB,EAAEC,eAAe,EAAEC,kBAAkB,EAAEC,cAAc,QAAQ,iBAAc;;AASzG;;AAeA;;AAwBA,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|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The ONE path from an OAuth authorization code to a committed session.
|
|
5
|
+
*
|
|
6
|
+
* Both web transports end here — the popup with an in-memory handshake, the
|
|
7
|
+
* redirect lane with one read back from `sessionStorage` — so state validation,
|
|
8
|
+
* the PKCE exchange, the session commit, and handshake cleanup exist exactly
|
|
9
|
+
* once. Duplicating any of those per transport is how the two lanes would drift
|
|
10
|
+
* apart on the security-critical steps.
|
|
11
|
+
*
|
|
12
|
+
* Ordering is deliberate and load-bearing:
|
|
13
|
+
* 1. validate `state` BEFORE anything is sent to the token endpoint,
|
|
14
|
+
* 2. exchange the code for a session,
|
|
15
|
+
* 3. run `cleanup` (drop the persisted handshake / strip `?code=` from the
|
|
16
|
+
* URL) BEFORE the commit, so a stale code can never re-enter the exchange,
|
|
17
|
+
* 4. commit the session.
|
|
18
|
+
*
|
|
19
|
+
* `cleanup` runs exactly once on EVERY exit path, including a state mismatch
|
|
20
|
+
* and a failed exchange.
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
import { logger } from '@oxyhq/core';
|
|
24
|
+
|
|
25
|
+
/** Inputs for {@link completeOAuthCode}. */
|
|
26
|
+
|
|
27
|
+
export async function completeOAuthCode(input) {
|
|
28
|
+
let cleaned = false;
|
|
29
|
+
const runCleanup = () => {
|
|
30
|
+
if (cleaned) return;
|
|
31
|
+
cleaned = true;
|
|
32
|
+
input.cleanup?.();
|
|
33
|
+
};
|
|
34
|
+
if (!input.handshake || !input.returnedState || input.handshake.state !== input.returnedState) {
|
|
35
|
+
logger.warn('OAuth completion rejected: missing or mismatched state', {
|
|
36
|
+
component: 'completeOAuthCode'
|
|
37
|
+
});
|
|
38
|
+
runCleanup();
|
|
39
|
+
return {
|
|
40
|
+
ok: false,
|
|
41
|
+
reason: 'state-mismatch'
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
try {
|
|
45
|
+
const result = await input.oxyServices.exchangeOAuthCode({
|
|
46
|
+
code: input.code,
|
|
47
|
+
clientId: input.clientId,
|
|
48
|
+
redirectUri: input.redirectUri,
|
|
49
|
+
codeVerifier: input.handshake.codeVerifier
|
|
50
|
+
});
|
|
51
|
+
runCleanup();
|
|
52
|
+
await input.commitSession({
|
|
53
|
+
sessionId: result.sessionId,
|
|
54
|
+
accessToken: result.accessToken,
|
|
55
|
+
deviceId: result.deviceId,
|
|
56
|
+
deviceSecret: result.deviceSecret,
|
|
57
|
+
userId: result.user.id,
|
|
58
|
+
expiresAt: result.expiresAt,
|
|
59
|
+
user: result.user
|
|
60
|
+
});
|
|
61
|
+
return {
|
|
62
|
+
ok: true
|
|
63
|
+
};
|
|
64
|
+
} catch (error) {
|
|
65
|
+
logger.warn('OAuth code exchange failed', {
|
|
66
|
+
component: 'completeOAuthCode'
|
|
67
|
+
}, error);
|
|
68
|
+
runCleanup();
|
|
69
|
+
return {
|
|
70
|
+
ok: false,
|
|
71
|
+
reason: 'exchange-failed'
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
//# sourceMappingURL=completeOAuthCode.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["logger","completeOAuthCode","input","cleaned","runCleanup","cleanup","handshake","returnedState","state","warn","component","ok","reason","result","oxyServices","exchangeOAuthCode","code","clientId","redirectUri","codeVerifier","commitSession","sessionId","accessToken","deviceId","deviceSecret","userId","user","id","expiresAt","error"],"sourceRoot":"../../../../src","sources":["ui/oauth/completeOAuthCode.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,MAAM,QAAQ,aAAa;;AAGpC;;AA2BA,OAAO,eAAeC,iBAAiBA,CACrCC,KAA6B,EACG;EAChC,IAAIC,OAAO,GAAG,KAAK;EACnB,MAAMC,UAAU,GAAGA,CAAA,KAAY;IAC7B,IAAID,OAAO,EAAE;IACbA,OAAO,GAAG,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AAE,KAAK;MAAEC,MAAM,EAAE;IAAkB,CAAC;EACjD;AACF","ignoreList":[]}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The legacy, redirect-mode-only lanes that navigate the RP's TOP-LEVEL window
|
|
5
|
+
* to the IdP without a user gesture.
|
|
6
|
+
*
|
|
7
|
+
* `webAuthMode: 'popup'` exists to guarantee exactly one thing: the relying
|
|
8
|
+
* party never leaves its route. Two mechanics in this SDK break that guarantee,
|
|
9
|
+
* because each replaces the whole document on its own initiative:
|
|
10
|
+
*
|
|
11
|
+
* 1. **Cold-boot silent restore** — a full-page `prompt=none` authorize bounce
|
|
12
|
+
* to `auth.oxy.so` when the device-secret mint finds no local session
|
|
13
|
+
* (`maybeStartSilentOAuthRestore`, called from `runProviderColdBoot`).
|
|
14
|
+
* 2. **Post-sign-in hub sync** — a full-page hop to `auth.oxy.so/sync` that
|
|
15
|
+
* plants this device's credential on the IdP hub so OTHER origins can later
|
|
16
|
+
* run lane 1 (`syncHubAfterSignIn`, called from the `commitSession` funnel).
|
|
17
|
+
*
|
|
18
|
+
* Both belong to the redirect transport and are kept only for the migration
|
|
19
|
+
* window (issue #691, "Cold boot and cross-domain behavior"). In popup mode a
|
|
20
|
+
* domain with no local credential simply resolves SIGNED OUT, and the user's
|
|
21
|
+
* next explicit "Continue with Oxy" opens the popup — from a real user gesture,
|
|
22
|
+
* never automatically.
|
|
23
|
+
*
|
|
24
|
+
* NOT covered here, and correctly enabled in BOTH modes: navigations the user
|
|
25
|
+
* asked for. When the browser blocks the popup, `startWebOAuthSignIn` still
|
|
26
|
+
* falls back to a full-page redirect rather than dead-ending the sign-in, and
|
|
27
|
+
* `tryCompleteOAuthReturn` still consumes a `?code=` that is already on the URL.
|
|
28
|
+
*
|
|
29
|
+
* PHASE 7b: once the pilot flips the default transport to `'popup'`, this
|
|
30
|
+
* predicate and BOTH lanes above are deleted outright. Grepping this symbol
|
|
31
|
+
* finds every site that has to go.
|
|
32
|
+
*/
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Whether a provider running `webAuthMode` may perform an SDK-initiated,
|
|
36
|
+
* non-gesture, full-page navigation to the IdP.
|
|
37
|
+
*
|
|
38
|
+
* `true` only for `'redirect'` — still the default and the compatibility path,
|
|
39
|
+
* whose behaviour must stay byte-for-byte unchanged.
|
|
40
|
+
*/
|
|
41
|
+
export function allowsAutomaticIdpRedirect(webAuthMode) {
|
|
42
|
+
return webAuthMode === 'redirect';
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=legacyRedirectLanes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["allowsAutomaticIdpRedirect","webAuthMode"],"sourceRoot":"../../../../src","sources":["ui/oauth/legacyRedirectLanes.ts"],"mappings":";;AAAA;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;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,0BAA0BA,CAACC,WAAwB,EAAW;EAC5E,OAAOA,WAAW,KAAK,UAAU;AACnC","ignoreList":[]}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The RP half of an OAuth authorize request: a fresh CSRF `state` + PKCE pair,
|
|
5
|
+
* and the authorize URL built from them.
|
|
6
|
+
*
|
|
7
|
+
* Both web transports start here, and the ONLY difference between them is one
|
|
8
|
+
* parameter: `popup` asks the IdP for `response_mode=web_message` so the result
|
|
9
|
+
* comes back to `window.opener` instead of navigating the RP's tab. Everything
|
|
10
|
+
* else — `S256` PKCE, exact registered `redirect_uri`, random `state` — is
|
|
11
|
+
* identical, which is what lets both lanes converge on one completion path.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
import { buildOAuthAuthorizeUrl, generateOAuthState, generatePkcePair } from '@oxyhq/core';
|
|
15
|
+
|
|
16
|
+
/** Inputs for {@link prepareAuthorizeRequest}. */
|
|
17
|
+
|
|
18
|
+
/** A ready-to-use authorize request plus the secrets that finish it. */
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Generate a fresh handshake and build the authorize URL around it.
|
|
22
|
+
*
|
|
23
|
+
* The verifier is returned to the caller and never stored here: the popup
|
|
24
|
+
* transport keeps it in memory for the lifetime of the attempt, and the
|
|
25
|
+
* redirect transport persists it through `persistOAuthHandshake` because a
|
|
26
|
+
* full-page navigation destroys the running document.
|
|
27
|
+
*/
|
|
28
|
+
export async function prepareAuthorizeRequest(params) {
|
|
29
|
+
const [pkce, state] = await Promise.all([generatePkcePair(), generateOAuthState()]);
|
|
30
|
+
const authorizeUrl = buildOAuthAuthorizeUrl({
|
|
31
|
+
authorizeBaseUrl: params.authorizeBaseUrl,
|
|
32
|
+
clientId: params.clientId,
|
|
33
|
+
redirectUri: params.redirectUri,
|
|
34
|
+
scope: params.scope,
|
|
35
|
+
state,
|
|
36
|
+
codeChallenge: pkce.codeChallenge,
|
|
37
|
+
...(params.responseMode ? {
|
|
38
|
+
responseMode: params.responseMode
|
|
39
|
+
} : {})
|
|
40
|
+
});
|
|
41
|
+
return {
|
|
42
|
+
authorizeUrl,
|
|
43
|
+
authorizeOrigin: new URL(authorizeUrl).origin,
|
|
44
|
+
handshake: {
|
|
45
|
+
state,
|
|
46
|
+
codeVerifier: pkce.codeVerifier
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=oauthHandshake.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["buildOAuthAuthorizeUrl","generateOAuthState","generatePkcePair","prepareAuthorizeRequest","params","pkce","state","Promise","all","authorizeUrl","authorizeBaseUrl","clientId","redirectUri","scope","codeChallenge","responseMode","authorizeOrigin","URL","origin","handshake","codeVerifier"],"sourceRoot":"../../../../src","sources":["ui/oauth/oauthHandshake.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,sBAAsB,EAAEC,kBAAkB,EAAEC,gBAAgB,QAAQ,aAAa;;AAG1F;;AAkBA;;AAaA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,eAAeC,uBAAuBA,CAC3CC,MAAqC,EACF;EACnC,MAAM,CAACC,IAAI,EAAEC,KAAK,CAAC,GAAG,MAAMC,OAAO,CAACC,GAAG,CAAC,CAACN,gBAAgB,CAAC,CAAC,EAAED,kBAAkB,CAAC,CAAC,CAAC,CAAC;EAEnF,MAAMQ,YAAY,GAAGT,sBAAsB,CAAC;IAC1CU,gBAAgB,EAAEN,MAAM,CAACM,gBAAgB;IACzCC,QAAQ,EAAEP,MAAM,CAACO,QAAQ;IACzBC,WAAW,EAAER,MAAM,CAACQ,WAAW;IAC/BC,KAAK,EAAET,MAAM,CAACS,KAAK;IACnBP,KAAK;IACLQ,aAAa,EAAET,IAAI,CAACS,aAAa;IACjC,IAAIV,MAAM,CAACW,YAAY,GAAG;MAAEA,YAAY,EAAEX,MAAM,CAACW;IAAa,CAAC,GAAG,CAAC,CAAC;EACtE,CAAC,CAAC;EAEF,OAAO;IACLN,YAAY;IACZO,eAAe,EAAE,IAAIC,GAAG,CAACR,YAAY,CAAC,CAACS,MAAM;IAC7CC,SAAS,EAAE;MAAEb,KAAK;MAAEc,YAAY,EAAEf,IAAI,CAACe;IAAa;EACtD,CAAC;AACH","ignoreList":[]}
|