@oxyhq/services 22.12.4 → 22.13.0
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 +18 -12
- package/lib/commonjs/index.js.map +1 -1
- 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/OxyAccountDialogScreen.js +27 -4
- package/lib/commonjs/ui/components/OxyAccountDialogScreen.js.map +1 -1
- package/lib/commonjs/ui/components/OxyAuthChooser.js +72 -1123
- 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/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 +144 -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 +63 -0
- package/lib/commonjs/ui/components/authChooser/TroubleDisclosure.js.map +1 -0
- package/lib/commonjs/ui/components/authChooser/primitives.js +169 -0
- package/lib/commonjs/ui/components/authChooser/primitives.js.map +1 -0
- package/lib/commonjs/ui/components/authChooser/requestSurfaces.js +149 -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 +59 -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/context/OxyContext.js +205 -30
- package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
- package/lib/commonjs/ui/context/commitSessionFlow.js +46 -0
- package/lib/commonjs/ui/context/commitSessionFlow.js.map +1 -1
- package/lib/commonjs/ui/context/hooks/useAuthOperations.js +15 -2
- package/lib/commonjs/ui/context/hooks/useAuthOperations.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 +170 -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 +276 -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/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 +5 -4
- 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 +72 -46
- package/lib/commonjs/ui/utils/oauthReturn.js.map +1 -1
- package/lib/module/index.js +9 -4
- package/lib/module/index.js.map +1 -1
- 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/OxyAccountDialogScreen.js +27 -4
- package/lib/module/ui/components/OxyAccountDialogScreen.js.map +1 -1
- package/lib/module/ui/components/OxyAuthChooser.js +76 -1128
- 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/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 +139 -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 +59 -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 +139 -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 +55 -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/context/OxyContext.js +208 -33
- package/lib/module/ui/context/OxyContext.js.map +1 -1
- package/lib/module/ui/context/commitSessionFlow.js +45 -0
- package/lib/module/ui/context/commitSessionFlow.js.map +1 -1
- package/lib/module/ui/context/hooks/useAuthOperations.js +15 -2
- package/lib/module/ui/context/hooks/useAuthOperations.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 +167 -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 +268 -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/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 +6 -5
- 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 +73 -47
- package/lib/module/ui/utils/oauthReturn.js.map +1 -1
- package/lib/typescript/commonjs/index.d.ts +4 -1
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- 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 +21 -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/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 +43 -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 +54 -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 +85 -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/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/commitSessionFlow.d.ts +40 -0
- package/lib/typescript/commonjs/ui/context/commitSessionFlow.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/hooks/useAuthOperations.d.ts +11 -2
- package/lib/typescript/commonjs/ui/context/hooks/useAuthOperations.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 +83 -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/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/oauthReturn.d.ts +30 -16
- package/lib/typescript/commonjs/ui/utils/oauthReturn.d.ts.map +1 -1
- package/lib/typescript/module/index.d.ts +4 -1
- package/lib/typescript/module/index.d.ts.map +1 -1
- 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 +21 -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/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 +43 -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 +54 -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 +85 -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/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/commitSessionFlow.d.ts +40 -0
- package/lib/typescript/module/ui/context/commitSessionFlow.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/hooks/useAuthOperations.d.ts +11 -2
- package/lib/typescript/module/ui/context/hooks/useAuthOperations.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 +83 -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/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/oauthReturn.d.ts +30 -16
- package/lib/typescript/module/ui/utils/oauthReturn.d.ts.map +1 -1
- package/package.json +6 -8
- package/src/index.ts +19 -5
- 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/OxyAccountDialogScreen.tsx +33 -4
- package/src/ui/components/OxyAuthChooser.tsx +100 -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/__tests__/OxyConsentScreen.test.tsx +27 -0
- package/src/ui/components/authChooser/AccountsMenuView.tsx +569 -0
- package/src/ui/components/authChooser/SignInEntryView.tsx +115 -0
- package/src/ui/components/authChooser/SignInRequestView.tsx +163 -0
- package/src/ui/components/authChooser/SignUpView.tsx +174 -0
- package/src/ui/components/authChooser/TroubleDisclosure.tsx +81 -0
- package/src/ui/components/authChooser/primitives.tsx +144 -0
- package/src/ui/components/authChooser/requestSurfaces.tsx +116 -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 +101 -0
- package/src/ui/components/authChooser/useUsernameAvailability.ts +60 -0
- package/src/ui/context/OxyContext.tsx +226 -24
- package/src/ui/context/__tests__/commitSessionFlow.test.ts +102 -0
- package/src/ui/context/commitSessionFlow.ts +64 -0
- package/src/ui/context/hooks/useAuthOperations.ts +26 -1
- 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 +352 -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 +193 -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 +277 -0
- package/src/ui/oauth/oauthPopupMessages.ts +136 -0
- package/src/ui/oauth/types.ts +150 -0
- 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/__tests__/crossOriginRestore.test.ts +17 -0
- package/src/ui/utils/crossOriginRestore.ts +9 -13
- package/src/ui/utils/deliveryPlatform.ts +65 -0
- package/src/ui/utils/oauthReturn.ts +79 -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
|
@@ -4,12 +4,21 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.consumeHubSyncFailure = consumeHubSyncFailure;
|
|
7
|
+
exports.replaceUrlAfterOAuthReturn = replaceUrlAfterOAuthReturn;
|
|
7
8
|
exports.tryCompleteOAuthReturn = tryCompleteOAuthReturn;
|
|
8
9
|
var _core = require("@oxyhq/core");
|
|
10
|
+
var _completeOAuthCode = require("../oauth/completeOAuthCode.js");
|
|
9
11
|
var _isWebBrowser = require("./isWebBrowser.js");
|
|
10
12
|
/**
|
|
11
|
-
* When the RP lands with `?code=` after
|
|
12
|
-
*
|
|
13
|
+
* When the RP lands with `?code=` after signing in at auth.oxy.so, exchange the
|
|
14
|
+
* code for a device-first session before cold boot runs.
|
|
15
|
+
*
|
|
16
|
+
* This is the REDIRECT transport's return leg. It owns only what is specific to
|
|
17
|
+
* a full-page round trip — reading the code off the URL, recovering the
|
|
18
|
+
* handshake `sessionStorage` carried across the navigation, and cleaning both up
|
|
19
|
+
* afterwards — and delegates state validation, the PKCE exchange, and the
|
|
20
|
+
* session commit to `completeOAuthCode`, the same function the popup transport
|
|
21
|
+
* runs.
|
|
13
22
|
*/
|
|
14
23
|
async function tryCompleteOAuthReturn(opts) {
|
|
15
24
|
if (!(0, _isWebBrowser.isWebBrowser)()) return false;
|
|
@@ -20,6 +29,7 @@ async function tryCompleteOAuthReturn(opts) {
|
|
|
20
29
|
const oauthError = params.get('error');
|
|
21
30
|
if (oauthError) {
|
|
22
31
|
stripOAuthParamsFromUrl();
|
|
32
|
+
(0, _core.clearOAuthHandshake)();
|
|
23
33
|
return false;
|
|
24
34
|
}
|
|
25
35
|
if (!code) return false;
|
|
@@ -29,46 +39,69 @@ async function tryCompleteOAuthReturn(opts) {
|
|
|
29
39
|
component: 'oauthReturn'
|
|
30
40
|
});
|
|
31
41
|
stripOAuthParamsFromUrl();
|
|
32
|
-
return false;
|
|
33
|
-
}
|
|
34
|
-
const returnedState = params.get('state');
|
|
35
|
-
const handshake = (0, _core.readOAuthHandshake)();
|
|
36
|
-
if (!handshake || !returnedState || handshake.state !== returnedState) {
|
|
37
|
-
_core.logger.warn('OAuth return ignored: missing or mismatched handshake', {
|
|
38
|
-
component: 'oauthReturn'
|
|
39
|
-
});
|
|
40
42
|
(0, _core.clearOAuthHandshake)();
|
|
41
|
-
stripOAuthParamsFromUrl();
|
|
42
43
|
return false;
|
|
43
44
|
}
|
|
44
|
-
const
|
|
45
|
+
const handshake = (0, _core.readOAuthHandshake)();
|
|
46
|
+
const redirectUri = (0, _core.canonicalizeOAuthRedirectUri)(handshake?.redirectUri ?? opts.authRedirectUri ?? location.origin);
|
|
47
|
+
const result = await (0, _completeOAuthCode.completeOAuthCode)({
|
|
48
|
+
oxyServices: opts.oxyServices,
|
|
49
|
+
clientId,
|
|
50
|
+
code,
|
|
51
|
+
returnedState: params.get('state'),
|
|
52
|
+
handshake,
|
|
53
|
+
redirectUri,
|
|
54
|
+
commitSession: opts.commitSession,
|
|
55
|
+
// Strip the params before the commit so a stale `?code=` cannot re-enter the
|
|
56
|
+
// exchange loop, and read the return path FIRST — clearOAuthHandshake drops
|
|
57
|
+
// it along with the PKCE keys.
|
|
58
|
+
cleanup: () => {
|
|
59
|
+
stripOAuthParamsFromUrl();
|
|
60
|
+
(0, _core.clearOAuthHandshake)();
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
return result.ok;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Rewrite the address bar after an authorize round trip, and tell the router.
|
|
68
|
+
*
|
|
69
|
+
* Prefers the page the visit started on (see `persistOAuthReturnPath`) over the
|
|
70
|
+
* bare origin the IdP redirected to, falling back to `fallbackUrl` when nothing
|
|
71
|
+
* was recorded.
|
|
72
|
+
*
|
|
73
|
+
* The `popstate` dispatch is the load-bearing part. `history.replaceState`
|
|
74
|
+
* fires no event, and cold boot runs *inside* the mounted app — by the time
|
|
75
|
+
* this executes, a history-based router (React Router, Vue Router, …) has
|
|
76
|
+
* already read `location` and rendered the route for `/`. Without a
|
|
77
|
+
* notification the address bar would show the restored deep link while the page
|
|
78
|
+
* still displayed the home page. `popstate` is the event the History API
|
|
79
|
+
* defines for exactly this, and it is what those routers subscribe to.
|
|
80
|
+
*
|
|
81
|
+
* Only dispatched when the URL actually changed, so the common no-op case does
|
|
82
|
+
* not push a spurious event at every listener on the page.
|
|
83
|
+
*/
|
|
84
|
+
function replaceUrlAfterOAuthReturn(fallbackUrl) {
|
|
85
|
+
const location = globalThis.location;
|
|
86
|
+
const history = globalThis.history;
|
|
87
|
+
if (!location || !history?.replaceState) return;
|
|
88
|
+
const current = `${location.pathname}${location.search}${location.hash}`;
|
|
89
|
+
const target = (0, _core.consumeOAuthReturnPath)() ?? fallbackUrl;
|
|
90
|
+
history.replaceState(history.state, '', target);
|
|
91
|
+
if (target === current) return;
|
|
92
|
+
const dispatch = globalThis.dispatchEvent;
|
|
93
|
+
if (typeof dispatch !== 'function') return;
|
|
45
94
|
try {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
// Strip OAuth params before commit so a stale `?code=` cannot re-enter the exchange loop.
|
|
53
|
-
(0, _core.clearOAuthHandshake)();
|
|
54
|
-
stripOAuthParamsFromUrl();
|
|
55
|
-
await opts.commitSession({
|
|
56
|
-
sessionId: result.sessionId,
|
|
57
|
-
accessToken: result.accessToken,
|
|
58
|
-
deviceId: result.deviceId,
|
|
59
|
-
deviceSecret: result.deviceSecret,
|
|
60
|
-
userId: result.user.id,
|
|
61
|
-
expiresAt: result.expiresAt,
|
|
62
|
-
user: result.user
|
|
63
|
-
});
|
|
64
|
-
return true;
|
|
95
|
+
// `PopStateEvent` is web-only; plain `Event` is a good enough carrier for
|
|
96
|
+
// any host that lacks it (routers read `location`, not `event.state`).
|
|
97
|
+
const event = typeof PopStateEvent === 'function' ? new PopStateEvent('popstate', {
|
|
98
|
+
state: history.state
|
|
99
|
+
}) : new Event('popstate');
|
|
100
|
+
dispatch.call(globalThis, event);
|
|
65
101
|
} catch (error) {
|
|
66
|
-
_core.logger.warn('
|
|
102
|
+
_core.logger.warn('Could not notify router of restored URL', {
|
|
67
103
|
component: 'oauthReturn'
|
|
68
104
|
}, error);
|
|
69
|
-
(0, _core.clearOAuthHandshake)();
|
|
70
|
-
stripOAuthParamsFromUrl();
|
|
71
|
-
return false;
|
|
72
105
|
}
|
|
73
106
|
}
|
|
74
107
|
function stripOAuthParamsFromUrl() {
|
|
@@ -81,11 +114,7 @@ function stripOAuthParamsFromUrl() {
|
|
|
81
114
|
url.searchParams.delete('error');
|
|
82
115
|
url.searchParams.delete('error_description');
|
|
83
116
|
url.searchParams.delete('hub_sync');
|
|
84
|
-
|
|
85
|
-
// the page the visit started on. Applies to the success path too: signing in
|
|
86
|
-
// from a deep link should return you to that link, not to the home page.
|
|
87
|
-
const returnPath = (0, _core.consumeOAuthReturnPath)();
|
|
88
|
-
history.replaceState(history.state, '', returnPath ?? `${url.pathname}${url.search}${url.hash}`);
|
|
117
|
+
replaceUrlAfterOAuthReturn(`${url.pathname}${url.search}${url.hash}`);
|
|
89
118
|
}
|
|
90
119
|
|
|
91
120
|
/**
|
|
@@ -96,18 +125,15 @@ function stripOAuthParamsFromUrl() {
|
|
|
96
125
|
function consumeHubSyncFailure() {
|
|
97
126
|
if (!(0, _isWebBrowser.isWebBrowser)()) return false;
|
|
98
127
|
const location = globalThis.location;
|
|
99
|
-
const history = globalThis.history;
|
|
100
128
|
if (!location) return false;
|
|
101
129
|
const params = new URLSearchParams(location.search);
|
|
102
130
|
if (params.get('hub_sync') !== 'failed') return false;
|
|
103
131
|
_core.logger.warn('Hub sync failed — IdP device session may be out of sync', {
|
|
104
132
|
component: 'hubSync'
|
|
105
133
|
});
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
history.replaceState(history.state, '', `${url.pathname}${url.search}${url.hash}`);
|
|
110
|
-
}
|
|
134
|
+
const url = new URL(location.href);
|
|
135
|
+
url.searchParams.delete('hub_sync');
|
|
136
|
+
replaceUrlAfterOAuthReturn(`${url.pathname}${url.search}${url.hash}`);
|
|
111
137
|
return true;
|
|
112
138
|
}
|
|
113
139
|
//# sourceMappingURL=oauthReturn.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_core","require","_isWebBrowser","tryCompleteOAuthReturn","opts","isWebBrowser","location","globalThis","params","URLSearchParams","search","code","get","oauthError","stripOAuthParamsFromUrl","clientId","logger","warn","component","
|
|
1
|
+
{"version":3,"names":["_core","require","_completeOAuthCode","_isWebBrowser","tryCompleteOAuthReturn","opts","isWebBrowser","location","globalThis","params","URLSearchParams","search","code","get","oauthError","stripOAuthParamsFromUrl","clearOAuthHandshake","clientId","logger","warn","component","handshake","readOAuthHandshake","redirectUri","canonicalizeOAuthRedirectUri","authRedirectUri","origin","result","completeOAuthCode","oxyServices","returnedState","commitSession","cleanup","ok","replaceUrlAfterOAuthReturn","fallbackUrl","history","replaceState","current","pathname","hash","target","consumeOAuthReturnPath","state","dispatch","dispatchEvent","event","PopStateEvent","Event","call","error","url","URL","href","searchParams","delete","consumeHubSyncFailure"],"sourceRoot":"../../../../src","sources":["ui/utils/oauthReturn.ts"],"mappings":";;;;;;;;AACA,IAAAA,KAAA,GAAAC,OAAA;AAOA,IAAAC,kBAAA,GAAAD,OAAA;AAEA,IAAAE,aAAA,GAAAF,OAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,eAAeG,sBAAsBA,CAACC,IAK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,YAAY,CAACC,MAAM,CAAC,UAAU,CAAC;EACnCrB,0BAA0B,CAAC,GAAGiB,GAAG,CAACZ,QAAQ,GAAGY,GAAG,CAACxC,MAAM,GAAGwC,GAAG,CAACX,IAAI,EAAE,CAAC;EACrE,OAAO,IAAI;AACb","ignoreList":[]}
|
package/lib/module/index.js
CHANGED
|
@@ -36,10 +36,10 @@ setPlatformOS(Platform.OS);
|
|
|
36
36
|
export { default as OxyProvider } from "./ui/components/OxyProvider.js";
|
|
37
37
|
export { useOxy } from "./ui/context/OxyContext.js";
|
|
38
38
|
export { useAuth } from "./ui/hooks/useAuth.js";
|
|
39
|
-
//
|
|
40
|
-
//
|
|
41
|
-
//
|
|
42
|
-
export {
|
|
39
|
+
// Thrown by `switchToAccount` / `switchSession` while `OxyProvider` runs with
|
|
40
|
+
// `sessionMode="identity"` — an identity-bound app authenticates as the owner of
|
|
41
|
+
// the local identity key and cannot switch accounts.
|
|
42
|
+
export { IdentityBoundSessionError } from "./ui/session/identityBinding.js";
|
|
43
43
|
|
|
44
44
|
// ---------------------------------------------------------------------------
|
|
45
45
|
// Zustand stores
|
|
@@ -107,6 +107,11 @@ export { useFileFiltering } from "./ui/hooks/useFileFiltering.js";
|
|
|
107
107
|
// ---------------------------------------------------------------------------
|
|
108
108
|
export { OXY_OAUTH_STATE_STORAGE_KEY, OXY_OAUTH_CODE_VERIFIER_STORAGE_KEY } from '@oxyhq/core';
|
|
109
109
|
export { default as OxySignInButton } from "./ui/components/OxySignInButton.js";
|
|
110
|
+
// Web OAuth transport (popup / redirect). RPs that ship their own sign-in
|
|
111
|
+
// button call `useOxy().startWebOAuthSignIn(...)`; only the popup opener is
|
|
112
|
+
// exported, because it MUST run synchronously inside the press handler to keep
|
|
113
|
+
// the browser's user-gesture attribution.
|
|
114
|
+
export { openOAuthPopup } from "./ui/oauth/oauthPopup.js";
|
|
110
115
|
export { OxyAuthPrompt } from "./ui/components/OxyAuthPrompt.js";
|
|
111
116
|
export { OxyOAuthCallback } from "./ui/components/OxyOAuthCallback.js";
|
|
112
117
|
export { OxyConsentScreen } from "./ui/components/OxyConsentScreen.js";
|
package/lib/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["setPlatformOS","Platform","OS","default","OxyProvider","useOxy","useAuth","
|
|
1
|
+
{"version":3,"names":["setPlatformOS","Platform","OS","default","OxyProvider","useOxy","useAuth","IdentityBoundSessionError","useAuthStore","useAccountStore","useAssetStore","useAssets","useAssetsStore","useAsset","useUploadProgress","useAssetLoading","useAssetErrors","useAssetsByApp","useAssetsByEntity","useAssetUsageCount","useIsAssetLinked","setOxyAssetInstance","useFileDownloadUrl","useFollow","useFollowerCounts","useSeedFollowStatuses","useStorage","useUserProfile","useUserProfiles","useCurrentUser","useUserById","useUserByUsername","useUsersBySessions","usePrivacySettings","useConnectedApps","useSessions","useSession","useDeviceSessions","useUserDevices","useSecurityInfo","useAccountStorageUsage","useSecurityActivity","useRecentSecurityActivity","useInfiniteSecurityActivity","useAuthMethods","useUserSubscription","useUserPayments","useUserWallet","useUserWalletTransactions","useUpdateProfile","useUploadAvatar","useUpdateAccountSettings","useUpdatePrivacySettings","useUpdateNotificationPreferences","useUpdateUserPreferences","useRevokeConnectedApp","useUploadFile","useSwitchSession","useLogoutSession","useLogoutAll","useUpdateDeviceName","useRemoveDevice","createProfileMutation","createGenericMutation","mutationKeys","queryKeys","invalidateAccountQueries","invalidateUserQueries","invalidateSessionQueries","invalidateDeviceQueries","invalidatePrivacyQueries","invalidateSecurityQueries","invalidateStorageQueries","invalidatePaymentsQueries","invalidateConnectedAppsQueries","invalidateAuthMethodsQueries","upsertCachedUser","upsertCachedUsers","useMutationStatus","useOnlineStatus","useOxyEvent","handleAuthError","isInvalidSessionError","isTimeoutOrNetworkError","extractErrorMessage","useFileFiltering","OXY_OAUTH_STATE_STORAGE_KEY","OXY_OAUTH_CODE_VERIFIER_STORAGE_KEY","OxySignInButton","openOAuthPopup","OxyAuthPrompt","OxyOAuthCallback","OxyConsentScreen","RequireOxyAuth","FollowButton","OxyPayButton","LogoIcon","LogoText","ProfileButton","OxyAuthChooser","useSwitchableAccounts","ProfileScreen","ManageAccountScreen","NotificationsScreen","PreferencesScreen","ConnectedAppsScreen","CreateAccountScreen","AccountMembersScreen","AccountSettingsScreen","showBottomSheet","closeBottomSheet","useSurfaceHeader","SurfaceHeaderAction","openAccountDialog","closeAccountDialog","subscribeToAccountDialog"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,SAASA,aAAa,QAAyB,aAAa;AAC5D,SAASC,QAAQ,QAAQ,cAAc;AACvCD,aAAa,CAACC,QAAQ,CAACC,EAAgB,CAAC;;AAExC;AACA;AACA;AACA,SAASC,OAAO,IAAIC,WAAW,QAAQ,gCAA6B;AACpE,SAASC,MAAM,QAAQ,4BAAyB;AAEhD,SAASC,OAAO,QAAQ,uBAAoB;AAE5C;AACA;AACA;AACA,SAASC,yBAAyB,QAAQ,iCAA8B;;AAExE;AACA;AACA;AACA,SAASC,YAAY,QAAQ,0BAAuB;AACpD,SAASC,eAAe,QAAQ,6BAA0B;AAC1D,SACIC,aAAa,EACbC,SAAS,IAAIC,cAAc,EAC3BC,QAAQ,EACRC,iBAAiB,EACjBC,eAAe,EACfC,cAAc,EACdC,cAAc,EACdC,iBAAiB,EACjBC,kBAAkB,EAClBC,gBAAgB,QACb,2BAAwB;;AAE/B;AACA;AACA;AACA,SAAST,SAAS,EAAEU,mBAAmB,QAAQ,yBAAsB;AACrE,SAASC,kBAAkB,QAAQ,kCAA+B;AAClE,SAASC,SAAS,EAAEC,iBAAiB,EAAEC,qBAAqB,QAAQ,yBAAsB;AAC1F,SAASC,UAAU,QAAQ,0BAAuB;AAGlD;AACA;AACA;AACA,SACIC,cAAc,EACdC,eAAe,EACf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QAAQ,uCAAoC;AAGtF;AACA;AACA;AACA,SAASC,gBAAgB,QAAmC,gCAA6B;AACzF,SAASC,mBAAmB,QAAuC,wCAAqC;;AAExG;AACA;AACA;AACA;AACA,SACEC,iBAAiB,EACjBC,kBAAkB,EAClBC,wBAAwB,QACnB,yCAAsC","ignoreList":[]}
|
|
@@ -5,6 +5,7 @@ import { loadPersistedDeviceCredential } from "../utils/deviceCredential.js";
|
|
|
5
5
|
import { consumeSilentOAuthError, isSilentRestoreEligibleOrigin, maybeStartSilentOAuthRestore } from "../utils/crossOriginRestore.js";
|
|
6
6
|
import { tryCompleteOAuthReturn, consumeHubSyncFailure } from "../utils/oauthReturn.js";
|
|
7
7
|
import { isWebBrowser } from "../utils/isWebBrowser.js";
|
|
8
|
+
import { allowsAutomaticIdpRedirect } from "../oauth/legacyRedirectLanes.js";
|
|
8
9
|
/** How long the cold boot waits for the post-boot SessionClient handoff (ms). */
|
|
9
10
|
export const SESSION_HANDOFF_DEADLINE_MS = 6000;
|
|
10
11
|
|
|
@@ -62,8 +63,18 @@ async function detectOfflineHint() {
|
|
|
62
63
|
*
|
|
63
64
|
* Ordered pipeline:
|
|
64
65
|
* 1. Complete OAuth authorization-code return (web)
|
|
65
|
-
* 2. `runSessionColdBoot` — device-secret mint (+ native shared-key
|
|
66
|
+
* 2. `runSessionColdBoot` — device-secret mint (+ native shared-key, or the
|
|
67
|
+
* primary-identity-key lane in `sessionMode: 'identity'`)
|
|
66
68
|
* 3. Silent OAuth for all web apps when mint finds no session
|
|
69
|
+
*
|
|
70
|
+
* Steps 1 and 3 are ACCOUNT-MODE ONLY: both commit whichever account the IdP
|
|
71
|
+
* resolves, which for an identity-bound client is somebody else's account by
|
|
72
|
+
* construction. In `'identity'` mode the boot is exactly step 2.
|
|
73
|
+
*
|
|
74
|
+
* Step 3 is additionally REDIRECT-MODE ONLY: it navigates the top-level window
|
|
75
|
+
* with no user gesture behind it, which `webAuthMode: 'popup'` exists to
|
|
76
|
+
* eliminate. In popup mode the boot is steps 1 and 2, and a domain with no local
|
|
77
|
+
* credential simply resolves signed out. See `allowsAutomaticIdpRedirect`.
|
|
67
78
|
*/
|
|
68
79
|
export async function runProviderColdBoot(opts) {
|
|
69
80
|
const {
|
|
@@ -72,17 +83,34 @@ export async function runProviderColdBoot(opts) {
|
|
|
72
83
|
clientId,
|
|
73
84
|
authRedirectUri,
|
|
74
85
|
authorizeBaseUrl,
|
|
86
|
+
sessionMode = 'account',
|
|
87
|
+
identity,
|
|
88
|
+
webAuthMode = 'redirect',
|
|
75
89
|
sessionClient,
|
|
76
90
|
syncDeviceCredentialToHost,
|
|
77
91
|
commitSession,
|
|
78
92
|
markAuthResolved,
|
|
79
93
|
setTokenReady
|
|
80
94
|
} = opts;
|
|
95
|
+
const identityBound = sessionMode === 'identity';
|
|
81
96
|
setTokenReady(false);
|
|
82
97
|
try {
|
|
98
|
+
// MODE-INDEPENDENT URL cleanup, deliberately so: both consume query params a
|
|
99
|
+
// PREVIOUS redirect-mode session left in the address bar (`?error=login_required`
|
|
100
|
+
// from a silent authorize, `?hub_sync=failed` from the hub) and restore the
|
|
101
|
+
// page the visit started on. Flipping an app to popup mode must not strand
|
|
102
|
+
// those params, so neither is gated on `webAuthMode`. Neither starts a
|
|
103
|
+
// navigation — they only rewrite the URL via `history.replaceState`.
|
|
83
104
|
consumeSilentOAuthError();
|
|
84
105
|
consumeHubSyncFailure();
|
|
85
|
-
|
|
106
|
+
|
|
107
|
+
// The redirect transport's RETURN leg — also NOT gated on `webAuthMode`. A
|
|
108
|
+
// popup-mode app legitimately lands here with `?code=` whenever the browser
|
|
109
|
+
// blocked the popup and `startWebOAuthSignIn` fell back to a full-page
|
|
110
|
+
// redirect (`popup-blocked` / `popup-navigation-failed`), and an app that
|
|
111
|
+
// switched modes mid-flight must not be stranded with a dead `?code=`
|
|
112
|
+
// either. It consumes a code already on the URL; it never starts one.
|
|
113
|
+
const oauthCompleted = identityBound ? false : await tryCompleteOAuthReturn({
|
|
86
114
|
oxyServices,
|
|
87
115
|
clientId,
|
|
88
116
|
authRedirectUri,
|
|
@@ -109,6 +137,8 @@ export async function runProviderColdBoot(opts) {
|
|
|
109
137
|
isWeb: isWebBrowser(),
|
|
110
138
|
isNative: !isWebBrowser()
|
|
111
139
|
},
|
|
140
|
+
sessionMode,
|
|
141
|
+
identity,
|
|
112
142
|
overallDeadlineMs: COLD_BOOT_OVERALL_DEADLINE_MS,
|
|
113
143
|
isOffline: () => offline,
|
|
114
144
|
onStepDeadline: stepId => {
|
|
@@ -163,14 +193,26 @@ export async function runProviderColdBoot(opts) {
|
|
|
163
193
|
}
|
|
164
194
|
});
|
|
165
195
|
|
|
166
|
-
// Silent cross-origin OAuth restore (web cross-app SSO)
|
|
167
|
-
//
|
|
168
|
-
//
|
|
169
|
-
//
|
|
170
|
-
//
|
|
171
|
-
//
|
|
196
|
+
// Silent cross-origin OAuth restore (web cross-app SSO): a full-page
|
|
197
|
+
// `prompt=none` bounce to the IdP when the mint found no local session.
|
|
198
|
+
//
|
|
199
|
+
// TRANSPORT gate (`allowsAutomaticIdpRedirect`): `webAuthMode: 'popup'`
|
|
200
|
+
// FORBIDS this lane. It navigates the top-level window with no user gesture
|
|
201
|
+
// behind it, which is precisely what popup mode exists to eliminate — a
|
|
202
|
+
// popup-mode domain without a local credential resolves signed out right
|
|
203
|
+
// here and waits for the user's next explicit "Continue with Oxy" (issue
|
|
204
|
+
// #691, "Cold boot and cross-domain behavior"). `'redirect'` — still the
|
|
205
|
+
// default and the compatibility path — reaches this lane unchanged, and this
|
|
206
|
+
// whole block disappears with the transport in phase 7b.
|
|
207
|
+
//
|
|
208
|
+
// ORIGIN gate: same as the hub-sync WRITE side (`syncHubAfterSignIn`) —
|
|
209
|
+
// official web origins only, never the IdP hub itself, and — unlike the
|
|
210
|
+
// write side — never a loopback / local-dev origin (which must not be
|
|
211
|
+
// bounced to a hosted IdP on cold boot). The authorize endpoint is
|
|
212
|
+
// env-configurable so a local/staging app targets its own IdP instead of
|
|
213
|
+
// production.
|
|
172
214
|
const webOrigin = isWebBrowser() ? globalThis.location?.origin : undefined;
|
|
173
|
-
if (clientId && outcome.kind !== 'session' && webOrigin && isSilentRestoreEligibleOrigin(webOrigin)) {
|
|
215
|
+
if (!identityBound && allowsAutomaticIdpRedirect(webAuthMode) && clientId && outcome.kind !== 'session' && webOrigin && isSilentRestoreEligibleOrigin(webOrigin)) {
|
|
174
216
|
const redirected = await maybeStartSilentOAuthRestore({
|
|
175
217
|
oxyServices,
|
|
176
218
|
clientId,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["logger","loggerUtil","runSessionColdBoot","loadPersistedDeviceCredential","consumeSilentOAuthError","isSilentRestoreEligibleOrigin","maybeStartSilentOAuthRestore","tryCompleteOAuthReturn","consumeHubSyncFailure","isWebBrowser","SESSION_HANDOFF_DEADLINE_MS","COLD_BOOT_OVERALL_DEADLINE_MS","OFFLINE_PROBE_TIMEOUT_MS","detectOfflineHint","online","globalThis","navigator","onLine","NetInfo","state","Promise","race","default","fetch","resolve","setTimeout","isConnected","runProviderColdBoot","opts","oxyServices","authStore","clientId","authRedirectUri","authorizeBaseUrl","sessionClient","syncDeviceCredentialToHost","commitSession","markAuthResolved","setTokenReady","oauthCompleted","input","activate","hubSync","offline","outcome","oxy","store","platform","isWeb","isNative","overallDeadlineMs","isOffline","onStepDeadline","stepId","warn","component","method","onSession","session","handoff","sessionId","accessToken","userId","handoffDeadlineId","finally","undefined","clearTimeout","onSignedOut","cred","start","socketError","__DEV__","debug","onStepError","id","error","webOrigin","location","origin","kind","redirected","redirectUri","Error","String"],"sourceRoot":"../../../../src","sources":["ui/boot/runProviderColdBoot.ts"],"mappings":";;AAAA,SACEA,MAAM,IAAIC,UAAU,EACpBC,kBAAkB,
|
|
1
|
+
{"version":3,"names":["logger","loggerUtil","runSessionColdBoot","loadPersistedDeviceCredential","consumeSilentOAuthError","isSilentRestoreEligibleOrigin","maybeStartSilentOAuthRestore","tryCompleteOAuthReturn","consumeHubSyncFailure","isWebBrowser","allowsAutomaticIdpRedirect","SESSION_HANDOFF_DEADLINE_MS","COLD_BOOT_OVERALL_DEADLINE_MS","OFFLINE_PROBE_TIMEOUT_MS","detectOfflineHint","online","globalThis","navigator","onLine","NetInfo","state","Promise","race","default","fetch","resolve","setTimeout","isConnected","runProviderColdBoot","opts","oxyServices","authStore","clientId","authRedirectUri","authorizeBaseUrl","sessionMode","identity","webAuthMode","sessionClient","syncDeviceCredentialToHost","commitSession","markAuthResolved","setTokenReady","identityBound","oauthCompleted","input","activate","hubSync","offline","outcome","oxy","store","platform","isWeb","isNative","overallDeadlineMs","isOffline","onStepDeadline","stepId","warn","component","method","onSession","session","handoff","sessionId","accessToken","userId","handoffDeadlineId","finally","undefined","clearTimeout","onSignedOut","cred","start","socketError","__DEV__","debug","onStepError","id","error","webOrigin","location","origin","kind","redirected","redirectUri","Error","String"],"sourceRoot":"../../../../src","sources":["ui/boot/runProviderColdBoot.ts"],"mappings":";;AAAA,SACEA,MAAM,IAAIC,UAAU,EACpBC,kBAAkB,QAKb,aAAa;AAEpB,SAASC,6BAA6B,QAAQ,8BAA2B;AACzE,SACEC,uBAAuB,EACvBC,6BAA6B,EAC7BC,4BAA4B,QACvB,gCAA6B;AACpC,SAASC,sBAAsB,EAAEC,qBAAqB,QAAQ,yBAAsB;AACpF,SAASC,YAAY,QAAQ,0BAAuB;AACpD,SAASC,0BAA0B,QAAQ,iCAA8B;AAIzE;AACA,OAAO,MAAMC,2BAA2B,GAAG,IAAI;;AAE/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,6BAA6B,GAAG,MAAM;;AAEnD;AACA;AACA;AACA;AACA;AACA,MAAMC,wBAAwB,GAAG,GAAG;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAeC,iBAAiBA,CAAA,EAAqB;EACnD,IAAI;IACF,IAAIL,YAAY,CAAC,CAAC,EAAE;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CAAC,EACxC;MACA,MAAMI,UAAU,GAAG,MAAM/E,4BAA4B,CAAC;QACpDwB,WAAW;QACXE,QAAQ;QACRsD,WAAW,EAAErD,eAAe;QAC5BC;MACF,CAAC,CAAC;MACF,IAAImD,UAAU,EAAE;QACd;MACF;IACF;EACF,CAAC,CAAC,OAAOL,KAAK,EAAE;IACd,IAAIJ,OAAO,EAAE;MACX3E,UAAU,CAAC+E,KAAK,CACd,iBAAiB,EACjBA,KAAK,YAAYO,KAAK,GAAGP,KAAK,GAAG,IAAIO,KAAK,CAACC,MAAM,CAACR,KAAK,CAAC,CAAC,EACzD;QAAEpB,SAAS,EAAE;MAAsB,CACrC,CAAC;IACH;EACF,CAAC,SAAS;IACRnB,gBAAgB,CAAC,CAAC;EACpB;AACF","ignoreList":[]}
|
package/lib/module/ui/client.js
CHANGED
|
@@ -18,7 +18,6 @@ export { LogoIcon } from "./components/logo/LogoIcon.js";
|
|
|
18
18
|
export { LogoText } from "./components/logo/LogoText.js";
|
|
19
19
|
export { default as FollowButton } from "./components/FollowButton.js";
|
|
20
20
|
export { default as OxyPayButton } from "./components/OxyPayButton.js";
|
|
21
|
-
export { FontLoader, setupFonts } from './components/FontLoader';
|
|
22
21
|
|
|
23
22
|
// Context
|
|
24
23
|
export { useOxy } from "./context/OxyContext.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["default","OxyProvider","OxySignInButton","OxyAuthPrompt","LogoIcon","LogoText","FollowButton","OxyPayButton","
|
|
1
|
+
{"version":3,"names":["default","OxyProvider","OxySignInButton","OxyAuthPrompt","LogoIcon","LogoText","FollowButton","OxyPayButton","useOxy","useAuth","useFollow","useStorage","ProfileScreen","ManageAccountScreen","useAuthStore","useAccountStore","handleAuthError","isInvalidSessionError","isTimeoutOrNetworkError","extractErrorMessage"],"sourceRoot":"../../../src","sources":["ui/client.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,SAASL,OAAO,IAAIM,YAAY,QAAQ,8BAA2B;AACnE,SAASN,OAAO,IAAIO,YAAY,QAAQ,8BAA2B;;AAEnE;AACA,SAASC,MAAM,QAAQ,yBAAsB;;AAE7C;AACA,SAASC,OAAO,QAAQ,oBAAiB;AAEzC,SAASC,SAAS,QAAQ,sBAAmB;AAC7C,SAASC,UAAU,QAAQ,uBAAoB;AAG/C;AACA,SAASX,OAAO,IAAIY,aAAa,QAAQ,4BAAyB;AAClE,SAASZ,OAAO,IAAIa,mBAAmB,QAAQ,kCAA+B;;AAE9E;AACA,SAASC,YAAY,QAAQ,uBAAoB;AACjD,SAASC,eAAe,QAAQ,0BAAuB;;AAEvD;AACA,SACIC,eAAe,EACfC,qBAAqB,EACrBC,uBAAuB,EACvBC,mBAAmB,QAChB,0BAAuB","ignoreList":[]}
|
|
@@ -75,7 +75,19 @@ const OxyAccountDialogScreen = ({
|
|
|
75
75
|
view
|
|
76
76
|
} = snapshot;
|
|
77
77
|
const showBack = view === 'qr' || view === 'signup' || view === 'add' && snapshot.accounts.length > 0;
|
|
78
|
-
const goToAccounts = useCallback(() =>
|
|
78
|
+
const goToAccounts = useCallback(() => {
|
|
79
|
+
if (!controller) return;
|
|
80
|
+
const {
|
|
81
|
+
view: currentView,
|
|
82
|
+
signIn
|
|
83
|
+
} = controller.getSnapshot();
|
|
84
|
+
// Backing out of an active request must withdraw it — otherwise the
|
|
85
|
+
// authorizeCode stays approvable until expiry (issue #691 phase 5).
|
|
86
|
+
if ((currentView === 'qr' || currentView === 'add') && (signIn.phase === 'starting' || signIn.phase === 'waiting')) {
|
|
87
|
+
controller.cancelSignIn();
|
|
88
|
+
}
|
|
89
|
+
controller.setView('accounts');
|
|
90
|
+
}, [controller]);
|
|
79
91
|
// An ENTRY view (accounts / signin — no in-dialog back of its own) that is
|
|
80
92
|
// MORPHED into a host surface (ManageAccount → switcher) has a frame beneath it,
|
|
81
93
|
// so its back CLOSES the dialog and reshapes back to the host — routed through
|
|
@@ -112,10 +124,16 @@ const OxyAccountDialogScreen = ({
|
|
|
112
124
|
|
|
113
125
|
function headerCopy(view, accountCount, t) {
|
|
114
126
|
switch (view) {
|
|
127
|
+
// The ACTIVE REQUEST. Its header is deliberately route-AGNOSTIC: Oxy picks
|
|
128
|
+
// the delivery route (QR here, a push to the user's phone, or opening
|
|
129
|
+
// Commons on this device — issue #691), so naming one of them in the bar
|
|
130
|
+
// would contradict the other two. The route-specific status line lives in
|
|
131
|
+
// the body, derived from `signIn.progress`, and is the only thing that
|
|
132
|
+
// describes HOW the request is travelling.
|
|
115
133
|
case 'qr':
|
|
116
134
|
return {
|
|
117
|
-
title: t('accountSwitcher.
|
|
118
|
-
subtitle:
|
|
135
|
+
title: t('accountSwitcher.signInWithOxy') || 'Sign in with Oxy',
|
|
136
|
+
subtitle: null
|
|
119
137
|
};
|
|
120
138
|
case 'signup':
|
|
121
139
|
return {
|
|
@@ -144,7 +162,12 @@ const EMPTY_SNAPSHOT = {
|
|
|
144
162
|
authorizeCode: null,
|
|
145
163
|
qrPayload: null,
|
|
146
164
|
expiresAt: null,
|
|
147
|
-
error: null
|
|
165
|
+
error: null,
|
|
166
|
+
route: null,
|
|
167
|
+
routeFailed: false,
|
|
168
|
+
pushSentAt: null,
|
|
169
|
+
openedAt: null,
|
|
170
|
+
progress: 'idle'
|
|
148
171
|
},
|
|
149
172
|
commonsAvailability: 'unknown'
|
|
150
173
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useCallback","useSyncExternalStore","StyleSheet","View","useOxy","useI18n","useSurfaceHeader","LogoText","OxyAuthChooser","jsx","_jsx","NAV_LOGO","height","OxyAccountDialogScreen","canGoBack","accountDialogController","controller","closeAccountDialog","t","subscribe","listener","undefined","getSnapshot","EMPTY_SNAPSHOT","snapshot","view","showBack","accounts","length","goToAccounts","setView","backsToHost","copy","headerCopy","titleContent","title","subtitle","onBack","style","styles","bodyContent","children","onComplete","accountCount","activeAccountId","loading","error","switchingAccountId","
|
|
1
|
+
{"version":3,"names":["useCallback","useSyncExternalStore","StyleSheet","View","useOxy","useI18n","useSurfaceHeader","LogoText","OxyAuthChooser","jsx","_jsx","NAV_LOGO","height","OxyAccountDialogScreen","canGoBack","accountDialogController","controller","closeAccountDialog","t","subscribe","listener","undefined","getSnapshot","EMPTY_SNAPSHOT","snapshot","view","showBack","accounts","length","goToAccounts","currentView","signIn","phase","cancelSignIn","setView","backsToHost","copy","headerCopy","titleContent","title","subtitle","onBack","style","styles","bodyContent","children","onComplete","accountCount","activeAccountId","loading","error","switchingAccountId","authorizeCode","qrPayload","expiresAt","route","routeFailed","pushSentAt","openedAt","progress","commonsAvailability","SCREEN_MARGIN","create","paddingTop","paddingBottom","paddingHorizontal"],"sourceRoot":"../../../../src","sources":["ui/components/OxyAccountDialogScreen.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,WAAW,EAAEC,oBAAoB,QAAQ,OAAO;AACzD,SAASC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAE/C,SAASC,MAAM,QAAQ,0BAAuB;AAC9C,SAASC,OAAO,QAAQ,qBAAkB;AAC1C,SAASC,gBAAgB,QAAQ,8BAA2B;AAE5D,OAAOC,QAAQ,MAAM,oBAAiB;AACtC,OAAOC,cAAc,MAAM,qBAAkB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAI9C;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,QAAQ,gBAAGD,IAAA,CAACH,QAAQ;EAACK,MAAM,EAAE;AAAG,CAAE,C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