@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
|
@@ -76,13 +76,20 @@ export interface OxyConsentScreenProps {
|
|
|
76
76
|
/**
|
|
77
77
|
* Friendly-label i18n keys for the scopes the platform issues. Standard OIDC
|
|
78
78
|
* scopes (`openid` / `profile` / `email` / `offline_access`) and the Oxy scope
|
|
79
|
-
* set
|
|
80
|
-
*
|
|
79
|
+
* set — including the `<resource>:read` ids the API actually issues
|
|
80
|
+
* (`profile:read`, `email:read`) — map to a curated `consent.scopes.*` sentence
|
|
81
|
+
* that already ships in `@oxyhq/core` for all 11 locales. This is the SAME
|
|
82
|
+
* vocabulary the Commons approval screen uses
|
|
83
|
+
* (`packages/commons/lib/commons-signin/scope-summary.ts`), so one permission
|
|
84
|
+
* reads identically wherever it is granted. Unknown scopes fall back to the raw
|
|
85
|
+
* scope string so the user always sees something concrete.
|
|
81
86
|
*/
|
|
82
|
-
const SCOPE_LABEL_KEYS: Record<string, string
|
|
87
|
+
const SCOPE_LABEL_KEYS: Readonly<Record<string, string>> = {
|
|
83
88
|
openid: 'consent.scopes.openid',
|
|
84
89
|
profile: 'consent.scopes.profile',
|
|
90
|
+
'profile:read': 'consent.scopes.profile',
|
|
85
91
|
email: 'consent.scopes.email',
|
|
92
|
+
'email:read': 'consent.scopes.email',
|
|
86
93
|
offline_access: 'consent.scopes.offlineAccess',
|
|
87
94
|
'user:read': 'consent.scopes.userRead',
|
|
88
95
|
'files:read': 'consent.scopes.filesRead',
|
|
@@ -96,9 +103,47 @@ const SCOPE_LABEL_KEYS: Record<string, string> = {
|
|
|
96
103
|
|
|
97
104
|
type Translate = ReturnType<typeof useI18n>['t'];
|
|
98
105
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
106
|
+
/** One permission row of the "Permissions requested" list. */
|
|
107
|
+
interface PermissionRow {
|
|
108
|
+
/** Stable list key / testID suffix — the first scope that produced this row. */
|
|
109
|
+
scope: string;
|
|
110
|
+
/** Shared `consent.scopes.*` key, absent when this build has no sentence for the scope. */
|
|
111
|
+
labelKey?: string;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Resolve the requested scopes into the rows the user actually reads.
|
|
116
|
+
*
|
|
117
|
+
* De-duplicates by RESOLVED MEANING rather than by raw string — `profile` and
|
|
118
|
+
* `profile:read` are one permission and must not render as two identical rows —
|
|
119
|
+
* while preserving the server's ordering. An unknown scope is never dropped: it
|
|
120
|
+
* keeps its own row and renders verbatim, so a permission this build has no
|
|
121
|
+
* sentence for is still shown to the person granting it.
|
|
122
|
+
*/
|
|
123
|
+
function resolvePermissionRows(scopes: readonly string[]): PermissionRow[] {
|
|
124
|
+
const rows: PermissionRow[] = [];
|
|
125
|
+
const seen = new Set<string>();
|
|
126
|
+
|
|
127
|
+
for (const raw of scopes) {
|
|
128
|
+
// The caller resolves scopes from the network; a non-string entry must not
|
|
129
|
+
// take the whole consent surface down with a `.trim()` on it.
|
|
130
|
+
if (typeof raw !== 'string') continue;
|
|
131
|
+
const scope = raw.trim();
|
|
132
|
+
if (!scope) continue;
|
|
133
|
+
|
|
134
|
+
const labelKey = SCOPE_LABEL_KEYS[scope];
|
|
135
|
+
const identity = labelKey ?? `raw:${scope}`;
|
|
136
|
+
if (seen.has(identity)) continue;
|
|
137
|
+
seen.add(identity);
|
|
138
|
+
|
|
139
|
+
rows.push(labelKey ? { scope, labelKey } : { scope });
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
return rows;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
function permissionRowLabel(row: PermissionRow, t: Translate): string {
|
|
146
|
+
return row.labelKey ? t(row.labelKey) : row.scope;
|
|
102
147
|
}
|
|
103
148
|
|
|
104
149
|
/** A tappable legal/website link that opens the URL in the platform browser. */
|
|
@@ -150,9 +195,7 @@ export function OxyConsentScreen({
|
|
|
150
195
|
const theme = useTheme();
|
|
151
196
|
const { t } = useI18n();
|
|
152
197
|
const appName = application.name;
|
|
153
|
-
|
|
154
|
-
// duplicate React keys and redundant rows.
|
|
155
|
-
const uniqueScopes = [...new Set(scopes)];
|
|
198
|
+
const permissionRows = resolvePermissionRows(scopes);
|
|
156
199
|
|
|
157
200
|
const provenanceLabel = application.isOfficial
|
|
158
201
|
? t('consent.provenance.official')
|
|
@@ -217,12 +260,12 @@ export function OxyConsentScreen({
|
|
|
217
260
|
{t('consent.permissions.title')}
|
|
218
261
|
</Text>
|
|
219
262
|
<View style={[styles.card, { borderColor: theme.colors.border, backgroundColor: theme.colors.card }]}>
|
|
220
|
-
{
|
|
221
|
-
|
|
222
|
-
<View key={scope} testID={`consent-scope-${scope}`} style={styles.row}>
|
|
263
|
+
{permissionRows.length > 0 ? (
|
|
264
|
+
permissionRows.map((row) => (
|
|
265
|
+
<View key={row.scope} testID={`consent-scope-${row.scope}`} style={styles.row}>
|
|
223
266
|
<View style={[styles.bullet, { backgroundColor: theme.colors.primary }]} />
|
|
224
267
|
<Text style={[styles.rowText, { color: theme.colors.text }]}>
|
|
225
|
-
{
|
|
268
|
+
{permissionRowLabel(row, t)}
|
|
226
269
|
</Text>
|
|
227
270
|
</View>
|
|
228
271
|
))
|
|
@@ -12,7 +12,6 @@ import { logger as loggerUtil } from '@oxyhq/core';
|
|
|
12
12
|
import { RequireOxyAuth } from './RequireOxyAuth';
|
|
13
13
|
import { attachQueryPersistence, createQueryClient } from '../hooks/queryClient';
|
|
14
14
|
import { createPlatformStorage, type StorageInterface } from '../utils/storageHelpers';
|
|
15
|
-
import { setupFonts } from './FontLoader';
|
|
16
15
|
|
|
17
16
|
/**
|
|
18
17
|
* Background color shown for the brief window between mount and the
|
|
@@ -40,9 +39,6 @@ const bootStyles = StyleSheet.create({
|
|
|
40
39
|
},
|
|
41
40
|
});
|
|
42
41
|
|
|
43
|
-
// Initialize fonts automatically
|
|
44
|
-
setupFonts();
|
|
45
|
-
|
|
46
42
|
// Detect if running on web
|
|
47
43
|
const isWeb = Platform.OS === 'web';
|
|
48
44
|
|
|
@@ -95,6 +91,8 @@ const OxyProvider: FC<OxyProviderProps> = ({
|
|
|
95
91
|
authWebUrl,
|
|
96
92
|
authRedirectUri,
|
|
97
93
|
authorizeBaseUrl,
|
|
94
|
+
sessionMode = 'account',
|
|
95
|
+
webAuthMode = 'redirect',
|
|
98
96
|
queryClient: providedQueryClient,
|
|
99
97
|
requireAuth = 'off',
|
|
100
98
|
hubSync = true,
|
|
@@ -293,6 +291,8 @@ const OxyProvider: FC<OxyProviderProps> = ({
|
|
|
293
291
|
authorizeBaseUrl={authorizeBaseUrl}
|
|
294
292
|
storageKeyPrefix={storageKeyPrefix}
|
|
295
293
|
clientId={clientId}
|
|
294
|
+
sessionMode={sessionMode}
|
|
295
|
+
webAuthMode={webAuthMode}
|
|
296
296
|
hubSync={hubSync}
|
|
297
297
|
onAuthStateChange={onAuthStateChange as OxyContextProviderProps['onAuthStateChange']}
|
|
298
298
|
>
|
|
@@ -6,9 +6,6 @@ import {
|
|
|
6
6
|
generatePkcePair,
|
|
7
7
|
generateOAuthState,
|
|
8
8
|
buildOAuthAuthorizeUrl,
|
|
9
|
-
OXY_OAUTH_STATE_STORAGE_KEY,
|
|
10
|
-
OXY_OAUTH_CODE_VERIFIER_STORAGE_KEY,
|
|
11
|
-
persistOAuthHandshake,
|
|
12
9
|
type PublicApplication,
|
|
13
10
|
} from '@oxyhq/core';
|
|
14
11
|
import { useAuthStore } from '../stores/authStore';
|
|
@@ -16,15 +13,18 @@ import { useShallow } from 'zustand/react/shallow';
|
|
|
16
13
|
import { useTheme } from '@oxyhq/bloom/theme';
|
|
17
14
|
import { Button, type ButtonVariant } from '@oxyhq/bloom/button';
|
|
18
15
|
import { useOxy } from '../context/OxyContext';
|
|
16
|
+
import { useI18n } from '../hooks/useI18n';
|
|
19
17
|
import { LogoIcon } from './logo/LogoIcon';
|
|
20
18
|
import { subscribeToAccountDialog } from '../navigation/accountDialogManager';
|
|
21
|
-
import {
|
|
19
|
+
import { openAuthorizeUrlNative } from './oauthNavigation';
|
|
20
|
+
import { closeOAuthPopup, openOAuthPopup } from '../oauth/oauthPopup';
|
|
21
|
+
import type { OAuthPopupHandle } from '../oauth/types';
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
24
|
* The OAuth handshake surfaced to a NATIVE third-party RP via
|
|
25
25
|
* {@link OxySignInButtonProps.onOAuthResult} so it can finish the code exchange
|
|
26
|
-
* (`POST /auth/oauth/token`). Web
|
|
27
|
-
*
|
|
26
|
+
* (`POST /auth/oauth/token`). Web sign-in is handled entirely by the SDK's web
|
|
27
|
+
* transport (`useOxy().startWebOAuthSignIn`) and never uses this callback.
|
|
28
28
|
*/
|
|
29
29
|
export interface OxyOAuthResult {
|
|
30
30
|
/** Deep-link URL the native auth session returned to (`?code=…&state=…`), or `null` if unobserved. */
|
|
@@ -35,17 +35,6 @@ export interface OxyOAuthResult {
|
|
|
35
35
|
codeVerifier: string;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
/**
|
|
39
|
-
* Persist the OAuth CSRF `state` + PKCE `code_verifier` for the RP callback.
|
|
40
|
-
* Returns `false` when the handshake could not be stored — no `sessionStorage`
|
|
41
|
-
* (SSR / non-browser host) or a write that threw (`SecurityError` /
|
|
42
|
-
* `QuotaExceededError`, e.g. Safari private mode) — so the caller aborts the
|
|
43
|
-
* flow cleanly rather than redirect to a callback that cannot validate `state`.
|
|
44
|
-
*/
|
|
45
|
-
function persistOAuthHandshakeForButton(state: string, codeVerifier: string): boolean {
|
|
46
|
-
return persistOAuthHandshake(state, codeVerifier);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
38
|
export interface OxySignInButtonProps {
|
|
50
39
|
/**
|
|
51
40
|
* Controls the appearance of the button
|
|
@@ -70,8 +59,12 @@ export interface OxySignInButtonProps {
|
|
|
70
59
|
textStyle?: StyleProp<TextStyle>;
|
|
71
60
|
|
|
72
61
|
/**
|
|
73
|
-
*
|
|
74
|
-
*
|
|
62
|
+
* Overrides the button label. When omitted the button renders the ONE
|
|
63
|
+
* primary relying-party action, localized: `accountSwitcher.continueWithOxy`
|
|
64
|
+
* ("Continue with Oxy" in English). "Sign in with Oxy" remains the name of
|
|
65
|
+
* the MECHANISM — only this surface's label is "Continue with Oxy".
|
|
66
|
+
*
|
|
67
|
+
* @default localized `accountSwitcher.continueWithOxy`
|
|
75
68
|
*/
|
|
76
69
|
text?: string;
|
|
77
70
|
|
|
@@ -90,19 +83,20 @@ export interface OxySignInButtonProps {
|
|
|
90
83
|
/**
|
|
91
84
|
* Exact registered redirect URI the OAuth authorization code is returned to.
|
|
92
85
|
* REQUIRED only for third-party (`type: 'third_party'`) applications, which
|
|
93
|
-
* sign in via
|
|
94
|
-
*
|
|
95
|
-
*
|
|
96
|
-
*
|
|
86
|
+
* sign in via OAuth + PKCE against `auth.oxy.so`. First-party / official apps
|
|
87
|
+
* open the in-app dialog and ignore this prop. If a third-party app resolves
|
|
88
|
+
* without it, the button logs an error and does nothing (it will not invent a
|
|
89
|
+
* redirect URI).
|
|
97
90
|
*/
|
|
98
91
|
oauthRedirectUri?: string;
|
|
99
92
|
|
|
100
93
|
/**
|
|
101
94
|
* Native only: receives the OAuth handshake after a third-party auth session
|
|
102
|
-
* so the RP can finish the token exchange. On web the
|
|
103
|
-
*
|
|
104
|
-
*
|
|
105
|
-
*
|
|
95
|
+
* so the RP can finish the token exchange. On web the SDK completes the flow
|
|
96
|
+
* itself — the popup transport keeps the handshake in memory, and the
|
|
97
|
+
* redirect transport reads it back from `sessionStorage` — so this is never
|
|
98
|
+
* called there. A native third-party sign-in with NO `onOAuthResult` handler
|
|
99
|
+
* cannot complete (the `state` + `code_verifier` are lost) and logs a warning.
|
|
106
100
|
*
|
|
107
101
|
* @example
|
|
108
102
|
* ```tsx
|
|
@@ -148,14 +142,15 @@ export const OxySignInButton: React.FC<OxySignInButtonProps> = ({
|
|
|
148
142
|
onPress,
|
|
149
143
|
style,
|
|
150
144
|
textStyle,
|
|
151
|
-
text
|
|
145
|
+
text,
|
|
152
146
|
disabled = false,
|
|
153
147
|
showWhenAuthenticated = false,
|
|
154
148
|
oauthRedirectUri,
|
|
155
149
|
onOAuthResult,
|
|
156
150
|
}) => {
|
|
157
151
|
const theme = useTheme();
|
|
158
|
-
const {
|
|
152
|
+
const { t } = useI18n();
|
|
153
|
+
const { openAccountDialog, oxyServices, clientId, webAuthMode, startWebOAuthSignIn } = useOxy();
|
|
159
154
|
const { isAuthenticated, isLoading } = useAuthStore(
|
|
160
155
|
useShallow((state) => ({ isAuthenticated: state.isAuthenticated, isLoading: state.isLoading }))
|
|
161
156
|
);
|
|
@@ -180,6 +175,12 @@ export const OxySignInButton: React.FC<OxySignInButtonProps> = ({
|
|
|
180
175
|
// redirects, so block a second concurrent press from racing the sessionStorage
|
|
181
176
|
// handshake against a different PKCE pair.
|
|
182
177
|
const routingRef = useRef(false);
|
|
178
|
+
// Popup mode only opens a window for applications that could actually need
|
|
179
|
+
// one: `oauthRedirectUri` is required for (and only for) third-party OAuth,
|
|
180
|
+
// so an official app never flashes a popup open and closed while its
|
|
181
|
+
// in-app dialog loads.
|
|
182
|
+
const shouldPreOpenPopup =
|
|
183
|
+
Platform.OS === 'web' && webAuthMode === 'popup' && Boolean(oauthRedirectUri);
|
|
183
184
|
|
|
184
185
|
const resolvePublicApplication = useCallback((): Promise<PublicApplication> | null => {
|
|
185
186
|
if (!clientId) return null;
|
|
@@ -204,44 +205,58 @@ export const OxySignInButton: React.FC<OxySignInButtonProps> = ({
|
|
|
204
205
|
openAccountDialog('signin');
|
|
205
206
|
}, [openAccountDialog]);
|
|
206
207
|
|
|
207
|
-
// Third-party surface: an OAuth 2.0 authorization-code + PKCE
|
|
208
|
+
// Third-party surface: an OAuth 2.0 authorization-code + PKCE flow against
|
|
208
209
|
// auth.oxy.so. No FedCM, no SSO bounce, no Oxy session cookies.
|
|
210
|
+
//
|
|
211
|
+
// Web delegates to the ONE shared transport (`startWebOAuthSignIn`), which
|
|
212
|
+
// owns popup-vs-redirect selection, the popup lifecycle, the code exchange,
|
|
213
|
+
// and the session commit. Native keeps its in-app auth session and hands the
|
|
214
|
+
// handshake to the RP, which owns that exchange.
|
|
209
215
|
const startThirdPartyOAuth = useCallback(
|
|
210
|
-
async (app: PublicApplication): Promise<void> => {
|
|
216
|
+
async (app: PublicApplication, popup: OAuthPopupHandle | null): Promise<void> => {
|
|
211
217
|
if (!clientId) {
|
|
218
|
+
closeOAuthPopup(popup);
|
|
212
219
|
startOfficialSignIn();
|
|
213
220
|
return;
|
|
214
221
|
}
|
|
215
222
|
if (!oauthRedirectUri) {
|
|
223
|
+
closeOAuthPopup(popup);
|
|
216
224
|
logger.error(
|
|
217
|
-
'OxySignInButton: a third_party application requires the `oauthRedirectUri` prop to start the OAuth
|
|
225
|
+
'OxySignInButton: a third_party application requires the `oauthRedirectUri` prop to start the OAuth flow; sign-in aborted',
|
|
218
226
|
undefined,
|
|
219
227
|
{ component: 'OxySignInButton', clientId, application: app.name },
|
|
220
228
|
);
|
|
221
229
|
return;
|
|
222
230
|
}
|
|
223
231
|
|
|
224
|
-
const [pkce, state] = await Promise.all([generatePkcePair(), generateOAuthState()]);
|
|
225
|
-
const authorizeUrl = buildOAuthAuthorizeUrl({
|
|
226
|
-
clientId,
|
|
227
|
-
redirectUri: oauthRedirectUri,
|
|
228
|
-
state,
|
|
229
|
-
codeChallenge: pkce.codeChallenge,
|
|
230
|
-
});
|
|
231
|
-
|
|
232
232
|
if (Platform.OS === 'web') {
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
233
|
+
const result = await startWebOAuthSignIn({
|
|
234
|
+
redirectUri: oauthRedirectUri,
|
|
235
|
+
// In popup mode the window was claimed during the press (see
|
|
236
|
+
// `handlePress`); `null` means the browser blocked it and the
|
|
237
|
+
// transport falls back to a redirect. `undefined` (redirect
|
|
238
|
+
// mode) lets the transport decide for itself.
|
|
239
|
+
...(shouldPreOpenPopup ? { popup } : {}),
|
|
240
|
+
});
|
|
241
|
+
if (result.status === 'failed') {
|
|
242
|
+
logger.warn(
|
|
243
|
+
`OxySignInButton: web sign-in failed (${result.reason})`,
|
|
244
|
+
{ component: 'OxySignInButton', application: app.name },
|
|
245
|
+
result.description,
|
|
246
|
+
);
|
|
238
247
|
}
|
|
239
|
-
redirectToAuthorize(authorizeUrl);
|
|
240
248
|
return;
|
|
241
249
|
}
|
|
242
250
|
|
|
243
251
|
// Native: open the in-app auth session, then hand the handshake to the
|
|
244
252
|
// RP so it can complete the token exchange from its deep-link callback.
|
|
253
|
+
const [pkce, state] = await Promise.all([generatePkcePair(), generateOAuthState()]);
|
|
254
|
+
const authorizeUrl = buildOAuthAuthorizeUrl({
|
|
255
|
+
clientId,
|
|
256
|
+
redirectUri: oauthRedirectUri,
|
|
257
|
+
state,
|
|
258
|
+
codeChallenge: pkce.codeChallenge,
|
|
259
|
+
});
|
|
245
260
|
const { redirectUrl } = await openAuthorizeUrlNative(authorizeUrl, oauthRedirectUri);
|
|
246
261
|
if (onOAuthResult) {
|
|
247
262
|
onOAuthResult({ redirectUrl, state, codeVerifier: pkce.codeVerifier });
|
|
@@ -252,51 +267,73 @@ export const OxySignInButton: React.FC<OxySignInButtonProps> = ({
|
|
|
252
267
|
{ component: 'OxySignInButton', application: app.name },
|
|
253
268
|
);
|
|
254
269
|
},
|
|
255
|
-
[
|
|
270
|
+
[
|
|
271
|
+
clientId,
|
|
272
|
+
oauthRedirectUri,
|
|
273
|
+
onOAuthResult,
|
|
274
|
+
startOfficialSignIn,
|
|
275
|
+
startWebOAuthSignIn,
|
|
276
|
+
shouldPreOpenPopup,
|
|
277
|
+
],
|
|
256
278
|
);
|
|
257
279
|
|
|
258
|
-
// Resolve the Application once, then route: third-party → OAuth
|
|
259
|
-
//
|
|
260
|
-
//
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
startOfficialSignIn();
|
|
280
|
+
// Resolve the Application once, then route: third-party → OAuth; first-party
|
|
281
|
+
// / official / unresolved → the in-app dialog. Resolution failure NEVER
|
|
282
|
+
// breaks an official app's sign-in — it falls back to the dialog. Every path
|
|
283
|
+
// that does NOT reach the OAuth lane closes the pre-opened popup, so a
|
|
284
|
+
// mis-routed press can never leave an empty window on screen.
|
|
285
|
+
const routeSignIn = useCallback(
|
|
286
|
+
async (popup: OAuthPopupHandle | null): Promise<void> => {
|
|
287
|
+
if (routingRef.current) {
|
|
288
|
+
closeOAuthPopup(popup);
|
|
268
289
|
return;
|
|
269
290
|
}
|
|
270
|
-
|
|
291
|
+
routingRef.current = true;
|
|
271
292
|
try {
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
293
|
+
const resolving = resolvePublicApplication();
|
|
294
|
+
if (!resolving) {
|
|
295
|
+
closeOAuthPopup(popup);
|
|
296
|
+
startOfficialSignIn();
|
|
297
|
+
return;
|
|
298
|
+
}
|
|
299
|
+
let app: PublicApplication;
|
|
300
|
+
try {
|
|
301
|
+
app = await resolving;
|
|
302
|
+
} catch (error) {
|
|
303
|
+
closeOAuthPopup(popup);
|
|
304
|
+
logger.warn(
|
|
305
|
+
'OxySignInButton: could not resolve the application; opening the sign-in dialog',
|
|
306
|
+
{ component: 'OxySignInButton', clientId },
|
|
307
|
+
error,
|
|
308
|
+
);
|
|
309
|
+
startOfficialSignIn();
|
|
310
|
+
return;
|
|
311
|
+
}
|
|
312
|
+
if (app.type === 'third_party' && !app.isOfficial) {
|
|
313
|
+
await startThirdPartyOAuth(app, popup);
|
|
314
|
+
return;
|
|
315
|
+
}
|
|
316
|
+
closeOAuthPopup(popup);
|
|
279
317
|
startOfficialSignIn();
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
if (app.type === 'third_party' && !app.isOfficial) {
|
|
283
|
-
await startThirdPartyOAuth(app);
|
|
284
|
-
return;
|
|
318
|
+
} finally {
|
|
319
|
+
routingRef.current = false;
|
|
285
320
|
}
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
}
|
|
290
|
-
}, [resolvePublicApplication, startOfficialSignIn, startThirdPartyOAuth, clientId]);
|
|
321
|
+
},
|
|
322
|
+
[resolvePublicApplication, startOfficialSignIn, startThirdPartyOAuth, clientId],
|
|
323
|
+
);
|
|
291
324
|
|
|
292
325
|
// Defer to a caller-supplied handler, otherwise route by application type.
|
|
326
|
+
//
|
|
327
|
+
// The popup is opened HERE, synchronously, before the async application
|
|
328
|
+
// resolve: `window.open` only survives while the click is still being
|
|
329
|
+
// handled, so a window opened after that first `await` is silently blocked.
|
|
293
330
|
const handlePress = useCallback(() => {
|
|
294
331
|
if (onPress) {
|
|
295
332
|
onPress();
|
|
296
333
|
return;
|
|
297
334
|
}
|
|
298
|
-
void routeSignIn();
|
|
299
|
-
}, [onPress, routeSignIn]);
|
|
335
|
+
void routeSignIn(shouldPreOpenPopup ? openOAuthPopup() : null);
|
|
336
|
+
}, [onPress, routeSignIn, shouldPreOpenPopup]);
|
|
300
337
|
|
|
301
338
|
// Don't show the button if already authenticated (unless explicitly overridden)
|
|
302
339
|
if (isAuthenticated && !showWhenAuthenticated) return null;
|
|
@@ -314,6 +351,10 @@ export const OxySignInButton: React.FC<OxySignInButtonProps> = ({
|
|
|
314
351
|
const logoColor = isContained ? '#ffffff' : theme.colors.primary;
|
|
315
352
|
const logoLetterColor = isContained ? theme.colors.primary : '#ffffff';
|
|
316
353
|
|
|
354
|
+
// The relying party surfaces exactly ONE primary action, and it reads
|
|
355
|
+
// "Continue with Oxy" (issue #691). A caller-supplied `text` still wins.
|
|
356
|
+
const label = text ?? t('accountSwitcher.continueWithOxy');
|
|
357
|
+
|
|
317
358
|
return (
|
|
318
359
|
<Button
|
|
319
360
|
variant={buttonVariant}
|
|
@@ -330,7 +371,7 @@ export const OxySignInButton: React.FC<OxySignInButtonProps> = ({
|
|
|
330
371
|
/>
|
|
331
372
|
}
|
|
332
373
|
>
|
|
333
|
-
{isLoading || isModalOpen ? '
|
|
374
|
+
{isLoading || isModalOpen ? t('signin.status.signingIn') : label}
|
|
334
375
|
</Button>
|
|
335
376
|
);
|
|
336
377
|
};
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `OxySignInRequestSurface` — the in-flight "Sign in with Oxy" request, rendered
|
|
3
|
+
* from plain facts (issue #691, Phase 5).
|
|
4
|
+
*
|
|
5
|
+
* The user already performed their one action. From here the surface only
|
|
6
|
+
* REPORTS: the route-appropriate primary visual, the status line for the
|
|
7
|
+
* progress it was told about, and nothing else at the same weight. Alternatives
|
|
8
|
+
* stay behind "Having trouble?" until the chosen route could not be carried out,
|
|
9
|
+
* at which point they ARE the content and render plainly.
|
|
10
|
+
*
|
|
11
|
+
* PRESENTATIONAL AND HEADLESS-FRIENDLY. It owns no request, no controller, no
|
|
12
|
+
* polling, and no state of its own: everything it draws is a prop. That is what
|
|
13
|
+
* lets the two hosts of this surface share ONE implementation —
|
|
14
|
+
*
|
|
15
|
+
* - `OxyAuthChooser`'s `SignInRequestView`, driven by `AccountDialogController`'s
|
|
16
|
+
* device flow;
|
|
17
|
+
* - the auth.oxy.so IdP's OAuth-bound lane, whose request carries an OAuth
|
|
18
|
+
* binding the account dialog's session has no concept of.
|
|
19
|
+
*
|
|
20
|
+
* It resolves only what every `@oxyhq/services` consumer already has in context:
|
|
21
|
+
* the Bloom theme (`useTheme`) and the SDK's own locale dictionary (`useI18n`,
|
|
22
|
+
* the `accountSwitcher.*` copy in all 11 locales). Host-specific copy — the
|
|
23
|
+
* labels on {@link OxySignInRequestSurfaceProps.subordinate} and
|
|
24
|
+
* {@link OxySignInRequestSurfaceProps.alternatives} — arrives already localized.
|
|
25
|
+
*
|
|
26
|
+
* TWO THINGS IT DELIBERATELY DOES NOT DO:
|
|
27
|
+
* - it renders no failure REASON. A host surfaces that the way its own shell
|
|
28
|
+
* demands (the account dialog toasts it — errors never render inline there;
|
|
29
|
+
* a full page may show a banner around this surface). The surface only takes
|
|
30
|
+
* the fact that the request failed, and offers the way forward.
|
|
31
|
+
* - it derives nothing from {@link OxySignInRequestSurfaceProps.qrPayload}.
|
|
32
|
+
* Application identity, origin, and scopes are resolved server-side by the
|
|
33
|
+
* approver (Commons), never read out of a payload here — the plate encodes it
|
|
34
|
+
* and shows nothing about it.
|
|
35
|
+
*
|
|
36
|
+
* SECRETS: every prop is safe to render. There is no `sessionToken` (the secret
|
|
37
|
+
* claim/finalize credential), no bearer, and no authorization code — a host
|
|
38
|
+
* keeps those in its own controller, and no prop on this component invites one.
|
|
39
|
+
*/
|
|
40
|
+
|
|
41
|
+
import type React from 'react';
|
|
42
|
+
import { View } from 'react-native';
|
|
43
|
+
import { Button } from '@oxyhq/bloom/button';
|
|
44
|
+
import { useTheme } from '@oxyhq/bloom/theme';
|
|
45
|
+
import { Text } from '@oxyhq/bloom/typography';
|
|
46
|
+
import type { CommonsDeliveryRoute, SignInProgress } from '@oxyhq/core';
|
|
47
|
+
import { useI18n } from '../hooks/useI18n';
|
|
48
|
+
import TroubleDisclosure from './authChooser/TroubleDisclosure';
|
|
49
|
+
import { SubtleLink } from './authChooser/primitives';
|
|
50
|
+
import { GetCommonsPrompt, RequestPrimarySurface } from './authChooser/requestSurfaces';
|
|
51
|
+
import { signInProgressLabel } from './authChooser/signInProgress';
|
|
52
|
+
import { authChooserStyles as styles } from './authChooser/styles';
|
|
53
|
+
import type { OxySignInSurfaceAction } from './authChooser/types';
|
|
54
|
+
|
|
55
|
+
/** Shared empty list, so an omitted action bundle allocates nothing per render. */
|
|
56
|
+
const NO_ACTIONS: readonly OxySignInSurfaceAction[] = [];
|
|
57
|
+
|
|
58
|
+
export interface OxySignInRequestSurfaceProps {
|
|
59
|
+
/**
|
|
60
|
+
* The ONE primary delivery route chosen for this request, or `null` while it
|
|
61
|
+
* is still being resolved. There is no chain: the surface renders exactly one
|
|
62
|
+
* route's visual, and never guesses one that has not been chosen yet.
|
|
63
|
+
*/
|
|
64
|
+
route: CommonsDeliveryRoute | null;
|
|
65
|
+
/**
|
|
66
|
+
* The request's DERIVED progress — the only thing the status line is built
|
|
67
|
+
* from. It must come from a real observed signal (a server-reported delivery,
|
|
68
|
+
* an approver opening the request, an approval); the surface owns no clock and
|
|
69
|
+
* will never advance it on its own. `'idle'` means there is nothing honest to
|
|
70
|
+
* report, and renders no status line.
|
|
71
|
+
*/
|
|
72
|
+
progress: SignInProgress;
|
|
73
|
+
/**
|
|
74
|
+
* The PUBLIC `oxycommons://approve?…` payload to encode as the QR, or `null`.
|
|
75
|
+
* It carries the single-use approval handle — never a secret credential — and
|
|
76
|
+
* the surface renders NOTHING derived from it.
|
|
77
|
+
*/
|
|
78
|
+
qrPayload?: string | null;
|
|
79
|
+
/**
|
|
80
|
+
* `true` when the chosen primary route could not be carried out on this device.
|
|
81
|
+
* The one signal that reveals {@link alternatives} without the user asking;
|
|
82
|
+
* a host never silently cascades to another route on its own.
|
|
83
|
+
*/
|
|
84
|
+
routeFailed?: boolean;
|
|
85
|
+
/**
|
|
86
|
+
* `true` when the request itself is terminally failed — there is no working
|
|
87
|
+
* primary route left to report on, so {@link onRetry} becomes the surface's one
|
|
88
|
+
* primary action and the alternatives render plainly.
|
|
89
|
+
*/
|
|
90
|
+
failed?: boolean;
|
|
91
|
+
/**
|
|
92
|
+
* Start a BRAND-NEW request. Rendered as the primary action while
|
|
93
|
+
* {@link failed}; omit it when a fresh attempt cannot help (a request that
|
|
94
|
+
* would fail identically every time), leaving the alternatives as the only
|
|
95
|
+
* way forward.
|
|
96
|
+
*/
|
|
97
|
+
onRetry?: () => void;
|
|
98
|
+
/**
|
|
99
|
+
* The acquisition action for a device where Commons is known to be ABSENT.
|
|
100
|
+
*
|
|
101
|
+
* Pass it ONLY on a positive "not installed" verdict. There, acquiring Commons
|
|
102
|
+
* is the GENUINE primary route — a same-device QR the user would have to scan
|
|
103
|
+
* with the very screen showing it is a dead end — so the surface leads with it
|
|
104
|
+
* and reports no route progress. Omit it wherever absence cannot be known (a
|
|
105
|
+
* browser cannot ask whether a URL scheme is registered).
|
|
106
|
+
*/
|
|
107
|
+
onAcquireCommons?: () => void;
|
|
108
|
+
/**
|
|
109
|
+
* Subordinate links rendered directly beneath the primary, always visible:
|
|
110
|
+
* the ways OUT of the surface that are not troubleshooting (creating an
|
|
111
|
+
* account, cancelling the request).
|
|
112
|
+
*/
|
|
113
|
+
subordinate?: readonly OxySignInSurfaceAction[];
|
|
114
|
+
/**
|
|
115
|
+
* The alternative ways to authenticate, kept behind "Having trouble?" until
|
|
116
|
+
* the user asks — or shown plainly once {@link failed} / {@link routeFailed}
|
|
117
|
+
* says the chosen route cannot deliver.
|
|
118
|
+
*/
|
|
119
|
+
alternatives?: readonly OxySignInSurfaceAction[];
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export const OxySignInRequestSurface: React.FC<OxySignInRequestSurfaceProps> = ({
|
|
123
|
+
route,
|
|
124
|
+
progress,
|
|
125
|
+
qrPayload = null,
|
|
126
|
+
routeFailed = false,
|
|
127
|
+
failed = false,
|
|
128
|
+
onRetry,
|
|
129
|
+
onAcquireCommons,
|
|
130
|
+
subordinate = NO_ACTIONS,
|
|
131
|
+
alternatives = NO_ACTIONS,
|
|
132
|
+
}) => {
|
|
133
|
+
const theme = useTheme();
|
|
134
|
+
const { t } = useI18n();
|
|
135
|
+
|
|
136
|
+
const subordinateLinks = subordinate.map((action) => (
|
|
137
|
+
<SubtleLink
|
|
138
|
+
key={action.key}
|
|
139
|
+
label={action.label}
|
|
140
|
+
theme={theme}
|
|
141
|
+
onPress={action.onPress}
|
|
142
|
+
disabled={action.disabled}
|
|
143
|
+
testID={action.key}
|
|
144
|
+
/>
|
|
145
|
+
));
|
|
146
|
+
|
|
147
|
+
// A failed request has no working primary route left. Its REASON is the host's
|
|
148
|
+
// to surface (toast / banner); all this owes the user is the way forward.
|
|
149
|
+
if (failed) {
|
|
150
|
+
return (
|
|
151
|
+
<View style={styles.centeredBlock}>
|
|
152
|
+
{onRetry ? (
|
|
153
|
+
<Button variant="primary" onPress={onRetry} style={styles.primaryButton}>
|
|
154
|
+
{t('common.actions.tryAgain')}
|
|
155
|
+
</Button>
|
|
156
|
+
) : null}
|
|
157
|
+
{subordinateLinks}
|
|
158
|
+
<TroubleDisclosure actions={alternatives} revealed theme={theme} t={t} />
|
|
159
|
+
</View>
|
|
160
|
+
);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
// Commons is absent: acquiring it IS the primary route, not a fallback, so it
|
|
164
|
+
// renders as the one primary action and no route progress is reported (there is
|
|
165
|
+
// no route to report on until the host says otherwise).
|
|
166
|
+
if (onAcquireCommons) {
|
|
167
|
+
return (
|
|
168
|
+
<View style={styles.centeredBlock}>
|
|
169
|
+
<GetCommonsPrompt theme={theme} t={t} onGetCommons={onAcquireCommons} />
|
|
170
|
+
{subordinateLinks}
|
|
171
|
+
<TroubleDisclosure actions={alternatives} revealed={false} theme={theme} t={t} />
|
|
172
|
+
</View>
|
|
173
|
+
);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
const status = signInProgressLabel(progress, route, t);
|
|
177
|
+
|
|
178
|
+
return (
|
|
179
|
+
<View style={styles.centeredBlock}>
|
|
180
|
+
<RequestPrimarySurface
|
|
181
|
+
route={route}
|
|
182
|
+
progress={progress}
|
|
183
|
+
qrPayload={qrPayload}
|
|
184
|
+
theme={theme}
|
|
185
|
+
t={t}
|
|
186
|
+
/>
|
|
187
|
+
{status ? (
|
|
188
|
+
<Text
|
|
189
|
+
style={[styles.mutedText, { color: theme.colors.textSecondary }]}
|
|
190
|
+
accessibilityLiveRegion="polite"
|
|
191
|
+
testID="signin-progress"
|
|
192
|
+
>
|
|
193
|
+
{status}
|
|
194
|
+
</Text>
|
|
195
|
+
) : null}
|
|
196
|
+
{subordinateLinks}
|
|
197
|
+
<TroubleDisclosure actions={alternatives} revealed={routeFailed} theme={theme} t={t} />
|
|
198
|
+
</View>
|
|
199
|
+
);
|
|
200
|
+
};
|
|
201
|
+
|
|
202
|
+
export default OxySignInRequestSurface;
|