@oxy.so/services 4.0.7 → 6.1.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 +2 -2
- package/lib/commonjs/assets/assets/signIn/slide-1.jpg +0 -0
- package/lib/commonjs/assets/assets/signIn/slide-1.jpg.d.ts +3 -0
- package/lib/commonjs/assets/assets/signIn/slide-2.jpg +0 -0
- package/lib/commonjs/assets/assets/signIn/slide-2.jpg.d.ts +3 -0
- package/lib/commonjs/assets/assets/signIn/slide-3.jpg +0 -0
- package/lib/commonjs/assets/assets/signIn/slide-3.jpg.d.ts +3 -0
- package/lib/commonjs/assets/assets/signIn/slide-4.jpg +0 -0
- package/lib/commonjs/assets/assets/signIn/slide-4.jpg.d.ts +3 -0
- package/lib/commonjs/assets/signIn/slide-1.jpg +0 -0
- package/lib/commonjs/assets/signIn/slide-2.jpg +0 -0
- package/lib/commonjs/assets/signIn/slide-3.jpg +0 -0
- package/lib/commonjs/assets/signIn/slide-4.jpg +0 -0
- package/lib/commonjs/index.js +77 -8
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/ui/components/OxyAccountDialogScreen.js +11 -58
- package/lib/commonjs/ui/components/OxyAccountDialogScreen.js.map +1 -1
- package/lib/commonjs/ui/components/OxyAuthChooser.js +36 -45
- package/lib/commonjs/ui/components/OxyAuthChooser.js.map +1 -1
- package/lib/commonjs/ui/components/OxyProvider.js +0 -2
- package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
- package/lib/commonjs/ui/components/ProfileButton.js.map +1 -1
- package/lib/commonjs/ui/components/authChooser/AccountsMenuView.js +30 -16
- package/lib/commonjs/ui/components/authChooser/AccountsMenuView.js.map +1 -1
- package/lib/commonjs/ui/components/authChooser/primitives.js +7 -52
- package/lib/commonjs/ui/components/authChooser/primitives.js.map +1 -1
- package/lib/commonjs/ui/components/authChooser/signInFailureMessage.js +1 -7
- package/lib/commonjs/ui/components/authChooser/signInFailureMessage.js.map +1 -1
- package/lib/commonjs/ui/components/authChooser/styles.js +0 -31
- package/lib/commonjs/ui/components/authChooser/styles.js.map +1 -1
- package/lib/commonjs/ui/components/authChooser/types.js +2 -2
- package/lib/commonjs/ui/components/authChooser/types.js.map +1 -1
- package/lib/commonjs/ui/components/oauthNavigation.js +1 -1
- package/lib/commonjs/ui/components/signIn/InlineCommonsQr.js +161 -0
- package/lib/commonjs/ui/components/signIn/InlineCommonsQr.js.map +1 -0
- package/lib/commonjs/ui/components/signIn/OxyAccountPicker.js +111 -0
- package/lib/commonjs/ui/components/signIn/OxyAccountPicker.js.map +1 -0
- package/lib/commonjs/ui/components/signIn/OxyAuthScreen.js +160 -0
- package/lib/commonjs/ui/components/signIn/OxyAuthScreen.js.map +1 -0
- package/lib/commonjs/ui/components/signIn/OxyCreateAccountPanel.js +236 -0
- package/lib/commonjs/ui/components/signIn/OxyCreateAccountPanel.js.map +1 -0
- package/lib/commonjs/ui/components/signIn/OxyDeleteAccountPanel.js +114 -0
- package/lib/commonjs/ui/components/signIn/OxyDeleteAccountPanel.js.map +1 -0
- package/lib/commonjs/ui/components/signIn/OxyLinkCommonsPanel.js +275 -0
- package/lib/commonjs/ui/components/signIn/OxyLinkCommonsPanel.js.map +1 -0
- package/lib/commonjs/ui/components/signIn/OxyRecoverAccountPanel.js +170 -0
- package/lib/commonjs/ui/components/signIn/OxyRecoverAccountPanel.js.map +1 -0
- package/lib/commonjs/ui/components/signIn/OxySignInPanel.js +371 -0
- package/lib/commonjs/ui/components/signIn/OxySignInPanel.js.map +1 -0
- package/lib/commonjs/ui/components/signIn/OxySignUpPanel.js +78 -0
- package/lib/commonjs/ui/components/signIn/OxySignUpPanel.js.map +1 -0
- package/lib/commonjs/ui/components/signIn/accountFlowParts.js +244 -0
- package/lib/commonjs/ui/components/signIn/accountFlowParts.js.map +1 -0
- package/lib/commonjs/ui/components/signIn/artwork.js +21 -0
- package/lib/commonjs/ui/components/signIn/artwork.js.map +1 -0
- package/lib/commonjs/ui/components/signIn/passkeyError.js +46 -0
- package/lib/commonjs/ui/components/signIn/passkeyError.js.map +1 -0
- package/lib/commonjs/ui/components/signIn/signInMethods.js +46 -0
- package/lib/commonjs/ui/components/signIn/signInMethods.js.map +1 -0
- package/lib/commonjs/ui/context/OxyContext.js +16 -16
- package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
- package/lib/commonjs/ui/context/commitSessionFlow.js +0 -43
- package/lib/commonjs/ui/context/commitSessionFlow.js.map +1 -1
- package/lib/commonjs/ui/context/passkeyFlow.js +22 -0
- package/lib/commonjs/ui/context/passkeyFlow.js.map +1 -1
- package/lib/commonjs/ui/hooks/accountDialogSnapshot.js +15 -1
- package/lib/commonjs/ui/hooks/accountDialogSnapshot.js.map +1 -1
- package/lib/commonjs/ui/hooks/useDeviceSwitcher.js +1 -3
- package/lib/commonjs/ui/hooks/useDeviceSwitcher.js.map +1 -1
- package/lib/commonjs/ui/oauth/browserAuthTransport.js +11 -4
- package/lib/commonjs/ui/oauth/browserAuthTransport.js.map +1 -1
- package/lib/commonjs/ui/oauth/oauthHandshake.js +3 -0
- package/lib/commonjs/ui/oauth/oauthHandshake.js.map +1 -1
- package/lib/commonjs/ui/oauth/oauthPopup.js +2 -3
- package/lib/commonjs/ui/oauth/oauthPopup.js.map +1 -1
- package/lib/commonjs/ui/screens/EditProfileFieldScreen.js +0 -23
- package/lib/commonjs/ui/screens/EditProfileFieldScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/EditProfileScreen.js +0 -8
- package/lib/commonjs/ui/screens/EditProfileScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ManageAccountScreen.js +3 -4
- package/lib/commonjs/ui/screens/ManageAccountScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/trust/TrustLeaderboardScreen.js +1 -1
- package/lib/commonjs/ui/screens/trust/TrustLeaderboardScreen.js.map +1 -1
- package/lib/commonjs/ui/session/authStore.js +0 -21
- package/lib/commonjs/ui/session/authStore.js.map +1 -1
- package/lib/commonjs/ui/utils/accountDeletionHandoff.js +2 -2
- package/lib/commonjs/ui/utils/accountDeletionHandoff.js.map +1 -1
- package/lib/module/assets/assets/signIn/slide-1.jpg +0 -0
- package/lib/module/assets/assets/signIn/slide-1.jpg.d.ts +3 -0
- package/lib/module/assets/assets/signIn/slide-2.jpg +0 -0
- package/lib/module/assets/assets/signIn/slide-2.jpg.d.ts +3 -0
- package/lib/module/assets/assets/signIn/slide-3.jpg +0 -0
- package/lib/module/assets/assets/signIn/slide-3.jpg.d.ts +3 -0
- package/lib/module/assets/assets/signIn/slide-4.jpg +0 -0
- package/lib/module/assets/assets/signIn/slide-4.jpg.d.ts +3 -0
- package/lib/module/assets/signIn/slide-1.jpg +0 -0
- package/lib/module/assets/signIn/slide-2.jpg +0 -0
- package/lib/module/assets/signIn/slide-3.jpg +0 -0
- package/lib/module/assets/signIn/slide-4.jpg +0 -0
- package/lib/module/index.js +14 -6
- package/lib/module/index.js.map +1 -1
- package/lib/module/ui/components/OxyAccountDialogScreen.js +14 -59
- package/lib/module/ui/components/OxyAccountDialogScreen.js.map +1 -1
- package/lib/module/ui/components/OxyAuthChooser.js +37 -46
- package/lib/module/ui/components/OxyAuthChooser.js.map +1 -1
- package/lib/module/ui/components/OxyProvider.js +0 -2
- package/lib/module/ui/components/OxyProvider.js.map +1 -1
- package/lib/module/ui/components/ProfileButton.js.map +1 -1
- package/lib/module/ui/components/authChooser/AccountsMenuView.js +22 -10
- package/lib/module/ui/components/authChooser/AccountsMenuView.js.map +1 -1
- package/lib/module/ui/components/authChooser/primitives.js +1 -44
- package/lib/module/ui/components/authChooser/primitives.js.map +1 -1
- package/lib/module/ui/components/authChooser/signInFailureMessage.js +1 -7
- package/lib/module/ui/components/authChooser/signInFailureMessage.js.map +1 -1
- package/lib/module/ui/components/authChooser/styles.js +0 -31
- package/lib/module/ui/components/authChooser/styles.js.map +1 -1
- package/lib/module/ui/components/authChooser/types.js +2 -2
- package/lib/module/ui/components/authChooser/types.js.map +1 -1
- package/lib/module/ui/components/oauthNavigation.js +1 -1
- package/lib/module/ui/components/signIn/InlineCommonsQr.js +157 -0
- package/lib/module/ui/components/signIn/InlineCommonsQr.js.map +1 -0
- package/lib/module/ui/components/signIn/OxyAccountPicker.js +106 -0
- package/lib/module/ui/components/signIn/OxyAccountPicker.js.map +1 -0
- package/lib/module/ui/components/signIn/OxyAuthScreen.js +151 -0
- package/lib/module/ui/components/signIn/OxyAuthScreen.js.map +1 -0
- package/lib/module/ui/components/signIn/OxyCreateAccountPanel.js +231 -0
- package/lib/module/ui/components/signIn/OxyCreateAccountPanel.js.map +1 -0
- package/lib/module/ui/components/signIn/OxyDeleteAccountPanel.js +109 -0
- package/lib/module/ui/components/signIn/OxyDeleteAccountPanel.js.map +1 -0
- package/lib/module/ui/components/signIn/OxyLinkCommonsPanel.js +270 -0
- package/lib/module/ui/components/signIn/OxyLinkCommonsPanel.js.map +1 -0
- package/lib/module/ui/components/signIn/OxyRecoverAccountPanel.js +165 -0
- package/lib/module/ui/components/signIn/OxyRecoverAccountPanel.js.map +1 -0
- package/lib/module/ui/components/signIn/OxySignInPanel.js +366 -0
- package/lib/module/ui/components/signIn/OxySignInPanel.js.map +1 -0
- package/lib/module/ui/components/signIn/OxySignUpPanel.js +75 -0
- package/lib/module/ui/components/signIn/OxySignUpPanel.js.map +1 -0
- package/lib/module/ui/components/signIn/accountFlowParts.js +235 -0
- package/lib/module/ui/components/signIn/accountFlowParts.js.map +1 -0
- package/lib/module/ui/components/signIn/artwork.js +16 -0
- package/lib/module/ui/components/signIn/artwork.js.map +1 -0
- package/lib/module/ui/components/signIn/passkeyError.js +40 -0
- package/lib/module/ui/components/signIn/passkeyError.js.map +1 -0
- package/lib/module/ui/components/signIn/signInMethods.js +42 -0
- package/lib/module/ui/components/signIn/signInMethods.js.map +1 -0
- package/lib/module/ui/context/OxyContext.js +17 -17
- package/lib/module/ui/context/OxyContext.js.map +1 -1
- package/lib/module/ui/context/commitSessionFlow.js +0 -42
- package/lib/module/ui/context/commitSessionFlow.js.map +1 -1
- package/lib/module/ui/context/passkeyFlow.js +21 -0
- package/lib/module/ui/context/passkeyFlow.js.map +1 -1
- package/lib/module/ui/hooks/accountDialogSnapshot.js +14 -1
- package/lib/module/ui/hooks/accountDialogSnapshot.js.map +1 -1
- package/lib/module/ui/hooks/useDeviceSwitcher.js +3 -5
- package/lib/module/ui/hooks/useDeviceSwitcher.js.map +1 -1
- package/lib/module/ui/oauth/browserAuthTransport.js +11 -4
- package/lib/module/ui/oauth/browserAuthTransport.js.map +1 -1
- package/lib/module/ui/oauth/oauthHandshake.js +3 -0
- package/lib/module/ui/oauth/oauthHandshake.js.map +1 -1
- package/lib/module/ui/oauth/oauthPopup.js +2 -3
- package/lib/module/ui/oauth/oauthPopup.js.map +1 -1
- package/lib/module/ui/screens/EditProfileFieldScreen.js +1 -24
- package/lib/module/ui/screens/EditProfileFieldScreen.js.map +1 -1
- package/lib/module/ui/screens/EditProfileScreen.js +0 -8
- package/lib/module/ui/screens/EditProfileScreen.js.map +1 -1
- package/lib/module/ui/screens/ManageAccountScreen.js +4 -5
- package/lib/module/ui/screens/ManageAccountScreen.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/session/authStore.js +1 -22
- package/lib/module/ui/session/authStore.js.map +1 -1
- package/lib/module/ui/utils/accountDeletionHandoff.js +3 -3
- package/lib/module/ui/utils/accountDeletionHandoff.js.map +1 -1
- package/lib/typescript/assets/signIn/slide-1.jpg.d.ts +3 -0
- package/lib/typescript/assets/signIn/slide-2.jpg.d.ts +3 -0
- package/lib/typescript/assets/signIn/slide-3.jpg.d.ts +3 -0
- package/lib/typescript/assets/signIn/slide-4.jpg.d.ts +3 -0
- package/lib/typescript/commonjs/index.d.ts +16 -2
- package/lib/typescript/commonjs/index.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 +5 -12
- package/lib/typescript/commonjs/ui/components/OxyAuthChooser.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/ProfileButton.d.ts +1 -1
- package/lib/typescript/commonjs/ui/components/ProfileButton.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/authChooser/AccountsMenuView.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/authChooser/primitives.d.ts +0 -19
- package/lib/typescript/commonjs/ui/components/authChooser/primitives.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/authChooser/signInFailureMessage.d.ts +1 -5
- package/lib/typescript/commonjs/ui/components/authChooser/signInFailureMessage.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/authChooser/styles.d.ts +0 -31
- package/lib/typescript/commonjs/ui/components/authChooser/styles.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/authChooser/types.d.ts +2 -7
- package/lib/typescript/commonjs/ui/components/authChooser/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/oauthNavigation.d.ts +1 -1
- package/lib/typescript/commonjs/ui/components/signIn/InlineCommonsQr.d.ts +20 -0
- package/lib/typescript/commonjs/ui/components/signIn/InlineCommonsQr.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/signIn/OxyAccountPicker.d.ts +34 -0
- package/lib/typescript/commonjs/ui/components/signIn/OxyAccountPicker.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/signIn/OxyAuthScreen.d.ts +43 -0
- package/lib/typescript/commonjs/ui/components/signIn/OxyAuthScreen.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/signIn/OxyCreateAccountPanel.d.ts +24 -0
- package/lib/typescript/commonjs/ui/components/signIn/OxyCreateAccountPanel.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/signIn/OxyDeleteAccountPanel.d.ts +16 -0
- package/lib/typescript/commonjs/ui/components/signIn/OxyDeleteAccountPanel.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/signIn/OxyLinkCommonsPanel.d.ts +21 -0
- package/lib/typescript/commonjs/ui/components/signIn/OxyLinkCommonsPanel.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/signIn/OxyRecoverAccountPanel.d.ts +20 -0
- package/lib/typescript/commonjs/ui/components/signIn/OxyRecoverAccountPanel.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/signIn/OxySignInPanel.d.ts +43 -0
- package/lib/typescript/commonjs/ui/components/signIn/OxySignInPanel.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/signIn/OxySignUpPanel.d.ts +17 -0
- package/lib/typescript/commonjs/ui/components/signIn/OxySignUpPanel.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/signIn/accountFlowParts.d.ts +60 -0
- package/lib/typescript/commonjs/ui/components/signIn/accountFlowParts.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/signIn/artwork.d.ts +8 -0
- package/lib/typescript/commonjs/ui/components/signIn/artwork.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/signIn/passkeyError.d.ts +16 -0
- package/lib/typescript/commonjs/ui/components/signIn/passkeyError.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/signIn/signInMethods.d.ts +39 -0
- package/lib/typescript/commonjs/ui/components/signIn/signInMethods.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 +0 -40
- package/lib/typescript/commonjs/ui/context/commitSessionFlow.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/oxyContextTypes.d.ts +15 -10
- package/lib/typescript/commonjs/ui/context/oxyContextTypes.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/passkeyFlow.d.ts +16 -1
- package/lib/typescript/commonjs/ui/context/passkeyFlow.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/accountDialogSnapshot.d.ts +7 -1
- package/lib/typescript/commonjs/ui/hooks/accountDialogSnapshot.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useDeviceSwitcher.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/oauth/browserAuthTransport.d.ts +9 -0
- package/lib/typescript/commonjs/ui/oauth/browserAuthTransport.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/oauth/oauthHandshake.d.ts +3 -0
- package/lib/typescript/commonjs/ui/oauth/oauthHandshake.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/oauth/oauthPopup.d.ts +2 -3
- package/lib/typescript/commonjs/ui/oauth/oauthPopup.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/EditProfileFieldScreen.d.ts +1 -1
- package/lib/typescript/commonjs/ui/screens/EditProfileFieldScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/EditProfileScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/ManageAccountScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/session/authStore.d.ts +0 -30
- package/lib/typescript/commonjs/ui/session/authStore.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/types/navigation.d.ts +0 -26
- package/lib/typescript/commonjs/ui/types/navigation.d.ts.map +1 -1
- package/lib/typescript/module/index.d.ts +16 -2
- package/lib/typescript/module/index.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 +5 -12
- package/lib/typescript/module/ui/components/OxyAuthChooser.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/ProfileButton.d.ts +1 -1
- package/lib/typescript/module/ui/components/ProfileButton.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/authChooser/AccountsMenuView.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/authChooser/primitives.d.ts +0 -19
- package/lib/typescript/module/ui/components/authChooser/primitives.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/authChooser/signInFailureMessage.d.ts +1 -5
- package/lib/typescript/module/ui/components/authChooser/signInFailureMessage.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/authChooser/styles.d.ts +0 -31
- package/lib/typescript/module/ui/components/authChooser/styles.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/authChooser/types.d.ts +2 -7
- package/lib/typescript/module/ui/components/authChooser/types.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/oauthNavigation.d.ts +1 -1
- package/lib/typescript/module/ui/components/signIn/InlineCommonsQr.d.ts +20 -0
- package/lib/typescript/module/ui/components/signIn/InlineCommonsQr.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/signIn/OxyAccountPicker.d.ts +34 -0
- package/lib/typescript/module/ui/components/signIn/OxyAccountPicker.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/signIn/OxyAuthScreen.d.ts +43 -0
- package/lib/typescript/module/ui/components/signIn/OxyAuthScreen.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/signIn/OxyCreateAccountPanel.d.ts +24 -0
- package/lib/typescript/module/ui/components/signIn/OxyCreateAccountPanel.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/signIn/OxyDeleteAccountPanel.d.ts +16 -0
- package/lib/typescript/module/ui/components/signIn/OxyDeleteAccountPanel.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/signIn/OxyLinkCommonsPanel.d.ts +21 -0
- package/lib/typescript/module/ui/components/signIn/OxyLinkCommonsPanel.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/signIn/OxyRecoverAccountPanel.d.ts +20 -0
- package/lib/typescript/module/ui/components/signIn/OxyRecoverAccountPanel.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/signIn/OxySignInPanel.d.ts +43 -0
- package/lib/typescript/module/ui/components/signIn/OxySignInPanel.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/signIn/OxySignUpPanel.d.ts +17 -0
- package/lib/typescript/module/ui/components/signIn/OxySignUpPanel.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/signIn/accountFlowParts.d.ts +60 -0
- package/lib/typescript/module/ui/components/signIn/accountFlowParts.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/signIn/artwork.d.ts +8 -0
- package/lib/typescript/module/ui/components/signIn/artwork.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/signIn/passkeyError.d.ts +16 -0
- package/lib/typescript/module/ui/components/signIn/passkeyError.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/signIn/signInMethods.d.ts +39 -0
- package/lib/typescript/module/ui/components/signIn/signInMethods.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 +0 -40
- package/lib/typescript/module/ui/context/commitSessionFlow.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/oxyContextTypes.d.ts +15 -10
- package/lib/typescript/module/ui/context/oxyContextTypes.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/passkeyFlow.d.ts +16 -1
- package/lib/typescript/module/ui/context/passkeyFlow.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/accountDialogSnapshot.d.ts +7 -1
- package/lib/typescript/module/ui/hooks/accountDialogSnapshot.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useDeviceSwitcher.d.ts.map +1 -1
- package/lib/typescript/module/ui/oauth/browserAuthTransport.d.ts +9 -0
- package/lib/typescript/module/ui/oauth/browserAuthTransport.d.ts.map +1 -1
- package/lib/typescript/module/ui/oauth/oauthHandshake.d.ts +3 -0
- package/lib/typescript/module/ui/oauth/oauthHandshake.d.ts.map +1 -1
- package/lib/typescript/module/ui/oauth/oauthPopup.d.ts +2 -3
- package/lib/typescript/module/ui/oauth/oauthPopup.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/EditProfileFieldScreen.d.ts +1 -1
- package/lib/typescript/module/ui/screens/EditProfileFieldScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/EditProfileScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/ManageAccountScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/session/authStore.d.ts +0 -30
- package/lib/typescript/module/ui/session/authStore.d.ts.map +1 -1
- package/lib/typescript/module/ui/types/navigation.d.ts +0 -26
- package/lib/typescript/module/ui/types/navigation.d.ts.map +1 -1
- package/package.json +4 -7
- package/src/assets/signIn/slide-1.jpg +0 -0
- package/src/assets/signIn/slide-1.jpg.d.ts +3 -0
- package/src/assets/signIn/slide-2.jpg +0 -0
- package/src/assets/signIn/slide-2.jpg.d.ts +3 -0
- package/src/assets/signIn/slide-3.jpg +0 -0
- package/src/assets/signIn/slide-3.jpg.d.ts +3 -0
- package/src/assets/signIn/slide-4.jpg +0 -0
- package/src/assets/signIn/slide-4.jpg.d.ts +3 -0
- package/src/index.ts +27 -7
- package/src/ui/components/OxyAccountDialogScreen.tsx +11 -72
- package/src/ui/components/OxyAuthChooser.tsx +37 -54
- package/src/ui/components/OxyProvider.tsx +0 -2
- package/src/ui/components/ProfileButton.tsx +1 -4
- package/src/ui/components/authChooser/AccountsMenuView.tsx +28 -8
- package/src/ui/components/authChooser/primitives.tsx +1 -39
- package/src/ui/components/authChooser/signInFailureMessage.ts +1 -7
- package/src/ui/components/authChooser/styles.ts +0 -31
- package/src/ui/components/authChooser/types.ts +2 -7
- package/src/ui/components/oauthNavigation.ts +1 -1
- package/src/ui/components/signIn/InlineCommonsQr.tsx +135 -0
- package/src/ui/components/signIn/OxyAccountPicker.tsx +129 -0
- package/src/ui/components/signIn/OxyAuthScreen.tsx +123 -0
- package/src/ui/components/signIn/OxyCreateAccountPanel.tsx +207 -0
- package/src/ui/components/signIn/OxyDeleteAccountPanel.tsx +106 -0
- package/src/ui/components/signIn/OxyLinkCommonsPanel.tsx +222 -0
- package/src/ui/components/signIn/OxyRecoverAccountPanel.tsx +154 -0
- package/src/ui/components/signIn/OxySignInPanel.tsx +392 -0
- package/src/ui/components/signIn/OxySignUpPanel.tsx +86 -0
- package/src/ui/components/signIn/accountFlowParts.tsx +204 -0
- package/src/ui/components/signIn/artwork.ts +13 -0
- package/src/ui/components/signIn/passkeyError.ts +44 -0
- package/src/ui/components/signIn/signInMethods.ts +51 -0
- package/src/ui/context/OxyContext.tsx +23 -19
- package/src/ui/context/__tests__/commitSessionFlow.test.ts +0 -89
- package/src/ui/context/__tests__/passkeyFlow.test.ts +59 -1
- package/src/ui/context/commitSessionFlow.ts +0 -61
- package/src/ui/context/oxyContextTypes.ts +16 -10
- package/src/ui/context/passkeyFlow.ts +28 -0
- package/src/ui/hooks/accountDialogSnapshot.ts +20 -1
- package/src/ui/hooks/useDeviceSwitcher.ts +3 -11
- package/src/ui/oauth/__tests__/browserAuthTransport.test.ts +21 -0
- package/src/ui/oauth/browserAuthTransport.ts +14 -4
- package/src/ui/oauth/oauthHandshake.ts +4 -1
- package/src/ui/oauth/oauthPopup.ts +2 -3
- package/src/ui/screens/EditProfileFieldScreen.tsx +1 -27
- package/src/ui/screens/EditProfileScreen.tsx +0 -6
- package/src/ui/screens/ManageAccountScreen.tsx +4 -5
- package/src/ui/screens/trust/TrustLeaderboardScreen.tsx +1 -1
- package/src/ui/session/authStore.ts +0 -37
- package/src/ui/types/navigation.ts +0 -26
- package/src/ui/utils/accountDeletionHandoff.ts +3 -3
- package/lib/commonjs/ui/components/authChooser/SignInEntryView.js +0 -132
- package/lib/commonjs/ui/components/authChooser/SignInEntryView.js.map +0 -1
- package/lib/commonjs/ui/components/authChooser/SignUpView.js +0 -77
- package/lib/commonjs/ui/components/authChooser/SignUpView.js.map +0 -1
- package/lib/commonjs/ui/components/passkeyHubPopup.js +0 -33
- package/lib/commonjs/ui/components/passkeyHubPopup.js.map +0 -1
- package/lib/commonjs/ui/oauth/legacyRedirectLanes.js +0 -48
- package/lib/commonjs/ui/oauth/legacyRedirectLanes.js.map +0 -1
- package/lib/module/ui/components/authChooser/SignInEntryView.js +0 -127
- package/lib/module/ui/components/authChooser/SignInEntryView.js.map +0 -1
- package/lib/module/ui/components/authChooser/SignUpView.js +0 -73
- package/lib/module/ui/components/authChooser/SignUpView.js.map +0 -1
- package/lib/module/ui/components/passkeyHubPopup.js +0 -29
- package/lib/module/ui/components/passkeyHubPopup.js.map +0 -1
- package/lib/module/ui/oauth/legacyRedirectLanes.js +0 -44
- package/lib/module/ui/oauth/legacyRedirectLanes.js.map +0 -1
- package/lib/typescript/commonjs/ui/components/authChooser/SignInEntryView.d.ts +0 -39
- package/lib/typescript/commonjs/ui/components/authChooser/SignInEntryView.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/authChooser/SignUpView.d.ts +0 -31
- package/lib/typescript/commonjs/ui/components/authChooser/SignUpView.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/passkeyHubPopup.d.ts +0 -23
- package/lib/typescript/commonjs/ui/components/passkeyHubPopup.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/oauth/legacyRedirectLanes.d.ts +0 -40
- package/lib/typescript/commonjs/ui/oauth/legacyRedirectLanes.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/authChooser/SignInEntryView.d.ts +0 -39
- package/lib/typescript/module/ui/components/authChooser/SignInEntryView.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/authChooser/SignUpView.d.ts +0 -31
- package/lib/typescript/module/ui/components/authChooser/SignUpView.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/passkeyHubPopup.d.ts +0 -23
- package/lib/typescript/module/ui/components/passkeyHubPopup.d.ts.map +0 -1
- package/lib/typescript/module/ui/oauth/legacyRedirectLanes.d.ts +0 -40
- package/lib/typescript/module/ui/oauth/legacyRedirectLanes.d.ts.map +0 -1
- package/src/ui/components/authChooser/SignInEntryView.tsx +0 -157
- package/src/ui/components/authChooser/SignUpView.tsx +0 -76
- package/src/ui/components/passkeyHubPopup.ts +0 -28
- package/src/ui/oauth/legacyRedirectLanes.ts +0 -43
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.OxySignUpPanel = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _button = require("@oxy.so/bloom/button");
|
|
10
|
+
var _RiKey2Line = require("@oxy.so/bloom/icons/RiKey2Line");
|
|
11
|
+
var _theme = require("@oxy.so/bloom/theme");
|
|
12
|
+
var _toast = require("@oxy.so/bloom/toast");
|
|
13
|
+
var _OxyContext = require("../../context/OxyContext.js");
|
|
14
|
+
var _accountDialogSnapshot = require("../../hooks/accountDialogSnapshot.js");
|
|
15
|
+
var _useI18n = require("../../hooks/useI18n.js");
|
|
16
|
+
var _commonsStoreLinks = require("../../utils/commonsStoreLinks.js");
|
|
17
|
+
var _isWebBrowser = require("../../utils/isWebBrowser.js");
|
|
18
|
+
var _primitives = require("../authChooser/primitives.js");
|
|
19
|
+
var _OxyAuthScreen = require("./OxyAuthScreen.js");
|
|
20
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
21
|
+
/**
|
|
22
|
+
* Account creation in the account dialog.
|
|
23
|
+
*
|
|
24
|
+
* On the web the account is made on auth.oxy.so, in its window over the app
|
|
25
|
+
* (`onCreateOnWeb`), and this app is signed in as it. On native, Commons
|
|
26
|
+
* creates the identity: straight in when it is installed, "Get Commons"
|
|
27
|
+
* otherwise.
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
/** Commons' own identity-creation deep link. */const COMMONS_CREATE_IDENTITY_URL = 'oxycommons://create-identity';
|
|
31
|
+
const OxySignUpPanel = ({
|
|
32
|
+
onSignIn,
|
|
33
|
+
onCreateOnWeb
|
|
34
|
+
}) => {
|
|
35
|
+
const theme = (0, _theme.useTheme)();
|
|
36
|
+
const {
|
|
37
|
+
t
|
|
38
|
+
} = (0, _useI18n.useI18n)();
|
|
39
|
+
const {
|
|
40
|
+
accountDialogController: controller
|
|
41
|
+
} = (0, _OxyContext.useOxy)();
|
|
42
|
+
const snapshot = (0, _accountDialogSnapshot.useAccountDialogSnapshot)(controller);
|
|
43
|
+
const web = (0, _isWebBrowser.isWebBrowser)();
|
|
44
|
+
const openExternal = (0, _react.useCallback)(url => {
|
|
45
|
+
Promise.resolve().then(() => _reactNative.Linking.openURL(url)).catch(() => _toast.toast.error(t('accountSwitcher.linkOpenFailed')));
|
|
46
|
+
}, [t]);
|
|
47
|
+
const commonsInstalled = snapshot.commonsAvailability === 'available';
|
|
48
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_OxyAuthScreen.OxyAuthScreen, {
|
|
49
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyAuthScreen.OxyAuthScreenHeader, {
|
|
50
|
+
title: t('signup.title'),
|
|
51
|
+
description: web ? t('signup.webSubtitle') : t('signup.subtitle')
|
|
52
|
+
}), web ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_button.Button, {
|
|
53
|
+
appearance: "solid",
|
|
54
|
+
tone: "action",
|
|
55
|
+
size: "lg",
|
|
56
|
+
fullWidth: true,
|
|
57
|
+
leadingIcon: _RiKey2Line.RiKey2Line,
|
|
58
|
+
onPress: onCreateOnWeb,
|
|
59
|
+
testID: "signup-open-identity",
|
|
60
|
+
children: t('signup.createAccount')
|
|
61
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_button.Button, {
|
|
62
|
+
appearance: "solid",
|
|
63
|
+
tone: "action",
|
|
64
|
+
size: "lg",
|
|
65
|
+
fullWidth: true,
|
|
66
|
+
onPress: () => openExternal(commonsInstalled ? COMMONS_CREATE_IDENTITY_URL : (0, _commonsStoreLinks.getCommonsAcquisitionUrl)(_reactNative.Platform.OS)),
|
|
67
|
+
testID: "signup-commons",
|
|
68
|
+
children: commonsInstalled ? t('signup.createInCommons') : t('accountSwitcher.getCommons')
|
|
69
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_primitives.SubtleLink, {
|
|
70
|
+
label: t('signup.backToSignInLink'),
|
|
71
|
+
theme: theme,
|
|
72
|
+
onPress: onSignIn,
|
|
73
|
+
testID: "back-to-sign-in"
|
|
74
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyAuthScreen.OxyAuthTerms, {})]
|
|
75
|
+
});
|
|
76
|
+
};
|
|
77
|
+
exports.OxySignUpPanel = OxySignUpPanel;
|
|
78
|
+
//# sourceMappingURL=OxySignUpPanel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_button","_RiKey2Line","_theme","_toast","_OxyContext","_accountDialogSnapshot","_useI18n","_commonsStoreLinks","_isWebBrowser","_primitives","_OxyAuthScreen","_jsxRuntime","COMMONS_CREATE_IDENTITY_URL","OxySignUpPanel","onSignIn","onCreateOnWeb","theme","useTheme","t","useI18n","accountDialogController","controller","useOxy","snapshot","useAccountDialogSnapshot","web","isWebBrowser","openExternal","useCallback","url","Promise","resolve","then","Linking","openURL","catch","toast","error","commonsInstalled","commonsAvailability","jsxs","OxyAuthScreen","children","jsx","OxyAuthScreenHeader","title","description","Button","appearance","tone","size","fullWidth","leadingIcon","RiKey2Line","onPress","testID","getCommonsAcquisitionUrl","Platform","OS","SubtleLink","label","OxyAuthTerms","exports"],"sourceRoot":"../../../../../src","sources":["ui/components/signIn/OxySignUpPanel.tsx"],"mappings":";;;;;;AAUA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK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GAAAA,cAAA","ignoreList":[]}
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.EmailCodeStep = exports.AccountFlowNote = exports.AccountFlowField = exports.AccountFlowErrorLine = exports.AccountFlowAction = void 0;
|
|
7
|
+
exports.describeAccountFlowError = describeAccountFlowError;
|
|
8
|
+
exports.isTicketExpired = isTicketExpired;
|
|
9
|
+
var _react = require("react");
|
|
10
|
+
var _reactNative = require("react-native");
|
|
11
|
+
var _button = require("@oxy.so/bloom/button");
|
|
12
|
+
var _theme = require("@oxy.so/bloom/theme");
|
|
13
|
+
var _textField = require("@oxy.so/bloom/text-field");
|
|
14
|
+
var _typography = require("@oxy.so/bloom/typography");
|
|
15
|
+
var _contracts = require("@oxy.so/contracts");
|
|
16
|
+
var _OxyContext = require("../../context/OxyContext.js");
|
|
17
|
+
var _useI18n = require("../../hooks/useI18n.js");
|
|
18
|
+
var _primitives = require("../authChooser/primitives.js");
|
|
19
|
+
var _OxyAuthScreen = require("./OxyAuthScreen.js");
|
|
20
|
+
var _passkeyError = require("./passkeyError.js");
|
|
21
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
22
|
+
/**
|
|
23
|
+
* The pieces auth.oxy.so's account pages share (ADR 0029 D3): creating a
|
|
24
|
+
* passkey account, recovering one, deleting one. Each is a page of the IdP
|
|
25
|
+
* built from the same sign-in shell as `OxySignInPanel`, so they read as one
|
|
26
|
+
* product; the passkey belongs to auth.oxy.so, so none of them runs anywhere
|
|
27
|
+
* else.
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
/** The API error code a thrown SDK error carries (`error.code`), if any. */function errorCode(error) {
|
|
31
|
+
const code = error?.code;
|
|
32
|
+
return typeof code === 'string' ? code : undefined;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/** A failure of an account page, in the person's language. */
|
|
36
|
+
function describeAccountFlowError(error, t) {
|
|
37
|
+
switch (errorCode(error)) {
|
|
38
|
+
case _contracts.EMAIL_VERIFICATION_ERROR_CODES.codeInvalid:
|
|
39
|
+
return t('emailCode.errors.codeInvalid');
|
|
40
|
+
case _contracts.EMAIL_VERIFICATION_ERROR_CODES.tooManyAttempts:
|
|
41
|
+
return t('emailCode.errors.tooManyAttempts');
|
|
42
|
+
case _contracts.EMAIL_VERIFICATION_ERROR_CODES.ticketInvalid:
|
|
43
|
+
case _contracts.EMAIL_VERIFICATION_ERROR_CODES.ticketRequired:
|
|
44
|
+
return t('emailCode.errors.expired');
|
|
45
|
+
case _contracts.EMAIL_VERIFICATION_ERROR_CODES.unavailable:
|
|
46
|
+
return t('emailCode.errors.unavailable');
|
|
47
|
+
default:
|
|
48
|
+
if ((0, _passkeyError.isRateLimited)(error)) return t('emailCode.errors.rateLimited');
|
|
49
|
+
return (0, _passkeyError.describePasskeyError)(error, t);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/** Whether the confirmation this flow holds is gone and it must start again. */
|
|
54
|
+
function isTicketExpired(error) {
|
|
55
|
+
const code = errorCode(error);
|
|
56
|
+
return code === _contracts.EMAIL_VERIFICATION_ERROR_CODES.ticketInvalid || code === _contracts.EMAIL_VERIFICATION_ERROR_CODES.ticketRequired;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/** One labelled input, the way the sign-in screen draws its username. */
|
|
60
|
+
const AccountFlowField = ({
|
|
61
|
+
label,
|
|
62
|
+
value,
|
|
63
|
+
onChange,
|
|
64
|
+
onSubmit,
|
|
65
|
+
error,
|
|
66
|
+
disabled,
|
|
67
|
+
placeholder,
|
|
68
|
+
autoComplete,
|
|
69
|
+
keyboardType,
|
|
70
|
+
maxLength,
|
|
71
|
+
testID
|
|
72
|
+
}) => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
73
|
+
style: styles.field,
|
|
74
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_textField.TextFieldLabel, {
|
|
75
|
+
children: label
|
|
76
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_textField.TextField, {
|
|
77
|
+
invalid: error !== null,
|
|
78
|
+
disabled: disabled,
|
|
79
|
+
radius: 999,
|
|
80
|
+
style: styles.input,
|
|
81
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_textField.TextFieldInput, {
|
|
82
|
+
testID: testID,
|
|
83
|
+
label: label,
|
|
84
|
+
value: value,
|
|
85
|
+
onValueChange: onChange,
|
|
86
|
+
placeholder: placeholder,
|
|
87
|
+
autoComplete: autoComplete,
|
|
88
|
+
keyboardType: keyboardType,
|
|
89
|
+
maxLength: maxLength,
|
|
90
|
+
autoCapitalize: "none",
|
|
91
|
+
autoCorrect: false,
|
|
92
|
+
autoFocus: true,
|
|
93
|
+
returnKeyType: "go",
|
|
94
|
+
onSubmitEditing: onSubmit,
|
|
95
|
+
"aria-required": true
|
|
96
|
+
})
|
|
97
|
+
}), error ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_textField.TextFieldHint, {
|
|
98
|
+
invalid: true,
|
|
99
|
+
children: error
|
|
100
|
+
}) : null]
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
/** The screen's one primary action. */
|
|
104
|
+
exports.AccountFlowField = AccountFlowField;
|
|
105
|
+
const AccountFlowAction = ({
|
|
106
|
+
label,
|
|
107
|
+
onPress,
|
|
108
|
+
pending,
|
|
109
|
+
disabled,
|
|
110
|
+
testID
|
|
111
|
+
}) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_button.Button, {
|
|
112
|
+
appearance: "solid",
|
|
113
|
+
tone: "action",
|
|
114
|
+
size: "lg",
|
|
115
|
+
fullWidth: true,
|
|
116
|
+
loading: pending,
|
|
117
|
+
disabled: pending || disabled,
|
|
118
|
+
onPress: onPress,
|
|
119
|
+
testID: testID,
|
|
120
|
+
children: label
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
/** A line of body copy under the header. */
|
|
124
|
+
exports.AccountFlowAction = AccountFlowAction;
|
|
125
|
+
const AccountFlowNote = ({
|
|
126
|
+
children
|
|
127
|
+
}) => {
|
|
128
|
+
const theme = (0, _theme.useTheme)();
|
|
129
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_typography.Text, {
|
|
130
|
+
style: [styles.note, {
|
|
131
|
+
color: theme.colors.textSecondary
|
|
132
|
+
}],
|
|
133
|
+
children: children
|
|
134
|
+
});
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
/** Why a step failed, where it happened. */
|
|
138
|
+
exports.AccountFlowNote = AccountFlowNote;
|
|
139
|
+
const AccountFlowErrorLine = ({
|
|
140
|
+
message
|
|
141
|
+
}) => {
|
|
142
|
+
const theme = (0, _theme.useTheme)();
|
|
143
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_typography.Text, {
|
|
144
|
+
accessibilityRole: "alert",
|
|
145
|
+
style: [styles.note, {
|
|
146
|
+
color: theme.colors.error
|
|
147
|
+
}],
|
|
148
|
+
children: message
|
|
149
|
+
});
|
|
150
|
+
};
|
|
151
|
+
exports.AccountFlowErrorLine = AccountFlowErrorLine;
|
|
152
|
+
/** "Check your email": the 6-digit code a verification sent. */
|
|
153
|
+
const EmailCodeStep = ({
|
|
154
|
+
description,
|
|
155
|
+
verificationId,
|
|
156
|
+
onConfirmed,
|
|
157
|
+
onResend,
|
|
158
|
+
back
|
|
159
|
+
}) => {
|
|
160
|
+
const theme = (0, _theme.useTheme)();
|
|
161
|
+
const {
|
|
162
|
+
t
|
|
163
|
+
} = (0, _useI18n.useI18n)();
|
|
164
|
+
const {
|
|
165
|
+
oxyServices
|
|
166
|
+
} = (0, _OxyContext.useOxy)();
|
|
167
|
+
const [code, setCode] = (0, _react.useState)('');
|
|
168
|
+
const [pending, setPending] = (0, _react.useState)(false);
|
|
169
|
+
const [error, setError] = (0, _react.useState)(null);
|
|
170
|
+
const [notice, setNotice] = (0, _react.useState)(null);
|
|
171
|
+
const confirm = () => {
|
|
172
|
+
const digits = code.replace(/\D/g, '');
|
|
173
|
+
if (digits.length !== _contracts.EMAIL_CODE_LENGTH || pending) {
|
|
174
|
+
setError(t('emailCode.errors.codeInvalid'));
|
|
175
|
+
return;
|
|
176
|
+
}
|
|
177
|
+
setError(null);
|
|
178
|
+
setPending(true);
|
|
179
|
+
oxyServices.confirmEmailVerification(verificationId, digits).then(onConfirmed).catch(reason => setError(describeAccountFlowError(reason, t))).finally(() => setPending(false));
|
|
180
|
+
};
|
|
181
|
+
const resend = () => {
|
|
182
|
+
setError(null);
|
|
183
|
+
setNotice(null);
|
|
184
|
+
setCode('');
|
|
185
|
+
onResend().then(() => setNotice(t('emailCode.resent'))).catch(reason => setError(describeAccountFlowError(reason, t)));
|
|
186
|
+
};
|
|
187
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_OxyAuthScreen.OxyAuthScreen, {
|
|
188
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyAuthScreen.OxyAuthScreenHeader, {
|
|
189
|
+
title: t('emailCode.title'),
|
|
190
|
+
description: description
|
|
191
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(AccountFlowField, {
|
|
192
|
+
label: t('emailCode.label'),
|
|
193
|
+
value: code,
|
|
194
|
+
onChange: value => {
|
|
195
|
+
setCode(value);
|
|
196
|
+
if (error) setError(null);
|
|
197
|
+
},
|
|
198
|
+
onSubmit: confirm,
|
|
199
|
+
error: error,
|
|
200
|
+
disabled: pending,
|
|
201
|
+
placeholder: "000000",
|
|
202
|
+
autoComplete: "one-time-code",
|
|
203
|
+
keyboardType: "number-pad",
|
|
204
|
+
maxLength: _contracts.EMAIL_CODE_LENGTH,
|
|
205
|
+
testID: "email-code"
|
|
206
|
+
}), notice ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_typography.Text, {
|
|
207
|
+
style: [styles.note, {
|
|
208
|
+
color: theme.colors.textSecondary
|
|
209
|
+
}],
|
|
210
|
+
children: notice
|
|
211
|
+
}) : null, /*#__PURE__*/(0, _jsxRuntime.jsx)(AccountFlowAction, {
|
|
212
|
+
label: t('signin.actions.continue'),
|
|
213
|
+
onPress: confirm,
|
|
214
|
+
pending: pending,
|
|
215
|
+
testID: "email-code-continue"
|
|
216
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_primitives.SubtleLink, {
|
|
217
|
+
label: t('emailCode.resend'),
|
|
218
|
+
theme: theme,
|
|
219
|
+
onPress: resend,
|
|
220
|
+
disabled: pending,
|
|
221
|
+
testID: "email-code-resend"
|
|
222
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_primitives.SubtleLink, {
|
|
223
|
+
label: back.label,
|
|
224
|
+
theme: theme,
|
|
225
|
+
onPress: back.onPress,
|
|
226
|
+
disabled: pending,
|
|
227
|
+
testID: "email-code-back"
|
|
228
|
+
})]
|
|
229
|
+
});
|
|
230
|
+
};
|
|
231
|
+
exports.EmailCodeStep = EmailCodeStep;
|
|
232
|
+
const styles = _reactNative.StyleSheet.create({
|
|
233
|
+
field: {
|
|
234
|
+
gap: 6
|
|
235
|
+
},
|
|
236
|
+
input: {
|
|
237
|
+
height: 40
|
|
238
|
+
},
|
|
239
|
+
note: {
|
|
240
|
+
fontSize: 16,
|
|
241
|
+
lineHeight: 24
|
|
242
|
+
}
|
|
243
|
+
});
|
|
244
|
+
//# sourceMappingURL=accountFlowParts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_button","_theme","_textField","_typography","_contracts","_OxyContext","_useI18n","_primitives","_OxyAuthScreen","_passkeyError","_jsxRuntime","errorCode","error","code","undefined","describeAccountFlowError","t","EMAIL_VERIFICATION_ERROR_CODES","codeInvalid","tooManyAttempts","ticketInvalid","ticketRequired","unavailable","isRateLimited","describePasskeyError","isTicketExpired","AccountFlowField","label","value","onChange","onSubmit","disabled","placeholder","autoComplete","keyboardType","maxLength","testID","jsxs","View","style","styles","field","children","jsx","TextFieldLabel","TextField","invalid","radius","input","TextFieldInput","onValueChange","autoCapitalize","autoCorrect","autoFocus","returnKeyType","onSubmitEditing","TextFieldHint","exports","AccountFlowAction","onPress","pending","Button","appearance","tone","size","fullWidth","loading","AccountFlowNote","theme","useTheme","Text","note","color","colors","textSecondary","AccountFlowErrorLine","message","accessibilityRole","EmailCodeStep","description","verificationId","onConfirmed","onResend","back","useI18n","oxyServices","useOxy","setCode","useState","setPending","setError","notice","setNotice","confirm","digits","replace","length","EMAIL_CODE_LENGTH","confirmEmailVerification","then","catch","reason","finally","resend","OxyAuthScreen","OxyAuthScreenHeader","title","SubtleLink","StyleSheet","create","gap","height","fontSize","lineHeight"],"sourceRoot":"../../../../../src","sources":["ui/components/signIn/accountFlowParts.tsx"],"mappings":";;;;;;;;AASA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,UAAA,GAAAJ,OAAA;AACA,IAAAK,WAAA,GAAAL,OAAA;AACA,IAAAM,UAAA,GAAAN,OAAA;AACA,IAAAO,WAAA,GAAAP,OAAA;AACA,IAAAQ,QAAA,GAAAR,OAAA;AAEA,IAAAS,WAAA,GAAAT,OAAA;AACA,IAAAU,cAAA,GAAAV,OAAA;AACA,IAAAW,aAAA,GAAAX,OAAA;AAAqE,IAAAY,WAAA,GAAAZ,OAAA;AArBrE;AACA;AACA;AACA;AACA;AACA;AACA;;AAiBA,4EACA,SAASa,SAASA,CAACC,KAAc,EAAsB;EACrD,MAAMC,IAAI,GAAID,KAAK,EAAgCC,IAAI;EACvD,OAAO,OAAOA,IAAI,KAAK,QAAQ,GAAGA,IAAI,GAAGC,SAAS;AACpD;;AAEA;AACO,SAASC,wBAAwBA,CAACH,KAAc,EAAEI,CAAY,EAAU;EAC7E,QAAQL,SAAS,CAACC,KAAK,CAAC;IACtB,KAAK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AACxB,MAAM,EAAC;IAAmB,CAAE,CAAC,eACzH,IAAA1B,WAAA,CAAAiC,GAAA,EAACpC,WAAA,CAAAoG,UAAU;MAAChF,KAAK,EAAEwD,IAAI,CAACxD,KAAM;MAACyC,KAAK,EAAEA,KAAM;MAACT,OAAO,EAAEwB,IAAI,CAACxB,OAAQ;MAAC5B,QAAQ,EAAE6B,OAAQ;MAACxB,MAAM,EAAC;IAAiB,CAAE,CAAC;EAAA,CACrG,CAAC;AAEpB,CAAC;AAACqB,OAAA,CAAAqB,aAAA,GAAAA,aAAA;AAEF,MAAMtC,MAAM,GAAGoE,uBAAU,CAACC,MAAM,CAAC;EAC/BpE,KAAK,EAAE;IACLqE,GAAG,EAAE;EACP,CAAC;EACD9D,KAAK,EAAE;IACL+D,MAAM,EAAE;EACV,CAAC;EACDxC,IAAI,EAAE;IACJyC,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE;EACd;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.SIGN_IN_SLIDES = void 0;
|
|
7
|
+
var _slide = _interopRequireDefault(require("../../../assets/signIn/slide-1.jpg"));
|
|
8
|
+
var _slide2 = _interopRequireDefault(require("../../../assets/signIn/slide-2.jpg"));
|
|
9
|
+
var _slide3 = _interopRequireDefault(require("../../../assets/signIn/slide-3.jpg"));
|
|
10
|
+
var _slide4 = _interopRequireDefault(require("../../../assets/signIn/slide-4.jpg"));
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
+
/**
|
|
13
|
+
* The photos the sign-in split card's carousel turns through. Shipped with the
|
|
14
|
+
* SDK and imported like its icon fonts, so every host serves them from its own
|
|
15
|
+
* origin — nothing to allow in anyone's CSP.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
const SIGN_IN_SLIDES = exports.SIGN_IN_SLIDES = [_slide.default, _slide2.default, _slide3.default, _slide4.default].map(source => ({
|
|
19
|
+
source
|
|
20
|
+
}));
|
|
21
|
+
//# sourceMappingURL=artwork.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_slide","_interopRequireDefault","require","_slide2","_slide3","_slide4","e","__esModule","default","SIGN_IN_SLIDES","exports","slide1","slide2","slide3","slide4","map","source"],"sourceRoot":"../../../../../src","sources":["ui/components/signIn/artwork.ts"],"mappings":";;;;;;AAOA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,OAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,OAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,OAAA,GAAAJ,sBAAA,CAAAC,OAAA;AAAwD,SAAAD,uBAAAK,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAVxD;AACA;AACA;AACA;AACA;;AAQO,MAAMG,cAAgC,GAAAC,OAAA,CAAAD,cAAA,GAAG,CAACE,cAAM,EAAEC,eAAM,EAAEC,eAAM,EAAEC,eAAM,CAAC,CAACC,GAAG,CAAEC,MAAM,KAAM;EAAEA;AAAO,CAAC,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.RATE_LIMIT_SECONDS = void 0;
|
|
7
|
+
exports.describePasskeyError = describePasskeyError;
|
|
8
|
+
exports.isRateLimited = isRateLimited;
|
|
9
|
+
/**
|
|
10
|
+
* The message for a failed passkey sign-in, and whether it was rate-limited.
|
|
11
|
+
*
|
|
12
|
+
* A dismissed or timed-out browser prompt rejects with a `NotAllowedError` /
|
|
13
|
+
* `AbortError` DOMException, often re-wrapped by `@simplewebauthn/browser` as a
|
|
14
|
+
* `WebAuthnError` whose `cause` is the original — so the cancellation shape is
|
|
15
|
+
* looked for along the cause chain, and reported calmly instead of as the raw
|
|
16
|
+
* "The operation either timed out or was not allowed…".
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
/** How long the surface waits after a 429 before it lets the person retry. */
|
|
20
|
+
const RATE_LIMIT_SECONDS = exports.RATE_LIMIT_SECONDS = 60;
|
|
21
|
+
function isCancellation(error) {
|
|
22
|
+
let current = error;
|
|
23
|
+
for (let depth = 0; depth < 5 && current instanceof Error; depth += 1) {
|
|
24
|
+
if (current.name === 'NotAllowedError' || current.name === 'AbortError') return true;
|
|
25
|
+
// `@simplewebauthn/browser`'s stable code for an aborted ceremony.
|
|
26
|
+
if (current.code === 'ERROR_CEREMONY_ABORTED') return true;
|
|
27
|
+
current = current.cause;
|
|
28
|
+
}
|
|
29
|
+
return false;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/** An HTTP status off a thrown SDK error (ApiError- or axios-shaped). */
|
|
33
|
+
function errorStatus(error) {
|
|
34
|
+
return error?.status ?? error?.response?.status;
|
|
35
|
+
}
|
|
36
|
+
function isRateLimited(error) {
|
|
37
|
+
return errorStatus(error) === 429;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/** The inline message for a passkey ceremony that did not sign anyone in. */
|
|
41
|
+
function describePasskeyError(error, t) {
|
|
42
|
+
if (isCancellation(error)) return t('signin.errors.passkeyCancelled');
|
|
43
|
+
if (error instanceof Error && error.message.trim().length > 0) return error.message;
|
|
44
|
+
return t('signin.errors.passkeyFailed');
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=passkeyError.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["RATE_LIMIT_SECONDS","exports","isCancellation","error","current","depth","Error","name","code","cause","errorStatus","status","response","isRateLimited","describePasskeyError","t","message","trim","length"],"sourceRoot":"../../../../../src","sources":["ui/components/signIn/passkeyError.ts"],"mappings":";;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA;AACO,MAAMA,kBAAkB,GAAAC,OAAA,CAAAD,kBAAA,GAAG,EAAE;AAEpC,SAASE,cAAcA,CAACC,KAAc,EAAW;EAC/C,IAAIC,OAAgB,GAAGD,KAAK;EAC5B,KAAK,IAAIE,KAAK,GAAG,CAAC,EAAEA,KAAK,GAAG,CAAC,IAAID,OAAO,YAAYE,KAAK,EAAED,KAAK,IAAI,CAAC,EAAE;IACrE,IAAID,OAAO,CAACG,IAAI,KAAK,iBAAiB,IAAIH,OAAO,CAACG,IAAI,KAAK,YAAY,EAAE,OAAO,IAAI;IACpF;IACA,IAAKH,OAAO,CAAwBI,IAAI,KAAK,wBAAwB,EAAE,OAAO,IAAI;IAClFJ,OAAO,GAAIA,OAAO,CAAyBK,KAAK;EAClD;EACA,OAAO,KAAK;AACd;;AAEA;AACA,SAASC,WAAWA,CAACP,KAAc,EAAsB;EACvD,OACGA,KAAK,EAAsCQ,MAAM,IACjDR,KAAK,EAAqDS,QAAQ,EAAED,MAAM;AAE/E;AAEO,SAASE,aAAaA,CAACV,KAAc,EAAW;EACrD,OAAOO,WAAW,CAACP,KAAK,CAAC,KAAK,GAAG;AACnC;;AAEA;AACO,SAASW,oBAAoBA,CAACX,KAAc,EAAEY,CAAY,EAAU;EACzE,IAAIb,cAAc,CAACC,KAAK,CAAC,EAAE,OAAOY,CAAC,CAAC,gCAAgC,CAAC;EACrE,IAAIZ,KAAK,YAAYG,KAAK,IAAIH,KAAK,CAACa,OAAO,CAACC,IAAI,CAAC,CAAC,CAACC,MAAM,GAAG,CAAC,EAAE,OAAOf,KAAK,CAACa,OAAO;EACnF,OAAOD,CAAC,CAAC,6BAA6B,CAAC;AACzC","ignoreList":[]}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.resolveSignInMethods = resolveSignInMethods;
|
|
7
|
+
/**
|
|
8
|
+
* Which sign-in methods a surface offers, from where it runs.
|
|
9
|
+
*
|
|
10
|
+
* One screen everywhere; only the transport behind each block changes:
|
|
11
|
+
*
|
|
12
|
+
* - auth.oxy.so (`page`) is where the web signs in: the embedded Commons QR
|
|
13
|
+
* (the split card's right column from `md`, "Continue with Oxy" below it),
|
|
14
|
+
* the username with its Continue, and the passkey — asserted right here,
|
|
15
|
+
* on the one origin every Oxy passkey belongs to;
|
|
16
|
+
* - an app's account dialog on the web (`dialog`) opens that screen in a
|
|
17
|
+
* window over the app ("Continue with Oxy"), like "Sign in with Google":
|
|
18
|
+
* the browser's session lives on auth.oxy.so, so every Oxy app shares it;
|
|
19
|
+
* - native signs in with Commons: "Continue with Oxy", or "Get Commons" on a
|
|
20
|
+
* device that has no Commons to continue with.
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* `qr` — auth.oxy.so: the embedded QR from `md`, "Continue with Oxy" below.
|
|
25
|
+
* `window` — an app on the web: "Continue with Oxy" opens auth.oxy.so's window.
|
|
26
|
+
* `continue` — native "Continue with Oxy": Oxy picks the route (shared
|
|
27
|
+
* keychain, Commons on this device, a push, or the QR view).
|
|
28
|
+
* `get-commons` — native, and Commons is not installed here.
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
function resolveSignInMethods(facts) {
|
|
32
|
+
if (facts.web) {
|
|
33
|
+
return facts.host === 'page' ? {
|
|
34
|
+
commons: 'qr',
|
|
35
|
+
passkey: true
|
|
36
|
+
} : {
|
|
37
|
+
commons: 'window',
|
|
38
|
+
passkey: false
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
return {
|
|
42
|
+
commons: facts.commonsAvailability === 'unavailable' ? 'get-commons' : 'continue',
|
|
43
|
+
passkey: false
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=signInMethods.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["resolveSignInMethods","facts","web","host","commons","passkey","commonsAvailability"],"sourceRoot":"../../../../../src","sources":["ui/components/signIn/signInMethods.ts"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;;AAkBO,SAASA,oBAAoBA,CAACC,KAAyB,EAAiB;EAC7E,IAAIA,KAAK,CAACC,GAAG,EAAE;IACb,OAAOD,KAAK,CAACE,IAAI,KAAK,MAAM,GAAG;MAAEC,OAAO,EAAE,IAAI;MAAEC,OAAO,EAAE;IAAK,CAAC,GAAG;MAAED,OAAO,EAAE,QAAQ;MAAEC,OAAO,EAAE;IAAM,CAAC;EACzG;EACA,OAAO;IACLD,OAAO,EAAEH,KAAK,CAACK,mBAAmB,KAAK,aAAa,GAAG,aAAa,GAAG,UAAU;IACjFD,OAAO,EAAE;EACX,CAAC;AACH","ignoreList":[]}
|
|
@@ -9,7 +9,6 @@ var _reactNative = require("react-native");
|
|
|
9
9
|
var _core = require("@oxy.so/core");
|
|
10
10
|
var _accountDialogManager = require("../navigation/accountDialogManager.js");
|
|
11
11
|
var _oauthNavigation = require("../components/oauthNavigation.js");
|
|
12
|
-
var _passkeyHubPopup = require("../components/passkeyHubPopup.js");
|
|
13
12
|
var _browserAuthTransport = require("../oauth/browserAuthTransport.js");
|
|
14
13
|
var _explicitOAuthConsent = require("../oauth/explicitOAuthConsent.js");
|
|
15
14
|
var _isWebBrowser = require("../utils/isWebBrowser.js");
|
|
@@ -70,7 +69,6 @@ const OxyRuntimeProvider = ({
|
|
|
70
69
|
sessionMode = 'account',
|
|
71
70
|
webAuthMode = 'popup',
|
|
72
71
|
backgroundSession = false,
|
|
73
|
-
deviceCredentialStorage = 'persistent',
|
|
74
72
|
platformStorage,
|
|
75
73
|
onAuthStateChange,
|
|
76
74
|
onError
|
|
@@ -95,16 +93,10 @@ const OxyRuntimeProvider = ({
|
|
|
95
93
|
|
|
96
94
|
// The device-first persisted auth-state store (per-origin device credential on
|
|
97
95
|
// web; SecureStore session blob on native). Built ONCE per provider mount.
|
|
98
|
-
//
|
|
99
|
-
// `deviceCredentialStorage` is mount-time configuration for the same reason
|
|
100
|
-
// `sessionMode` is: it decides where the durable credential lives, and letting
|
|
101
|
-
// it change mid-flight would mean a session that started ephemeral could begin
|
|
102
|
-
// writing one.
|
|
103
96
|
const authStoreRef = (0, _react.useRef)(null);
|
|
104
97
|
if (!authStoreRef.current) {
|
|
105
98
|
authStoreRef.current = (0, _index2.createPlatformAuthStateStore)({
|
|
106
|
-
sessionMode
|
|
107
|
-
storage: deviceCredentialStorage
|
|
99
|
+
sessionMode
|
|
108
100
|
});
|
|
109
101
|
}
|
|
110
102
|
const authStore = authStoreRef.current;
|
|
@@ -680,6 +672,16 @@ const OxyRuntimeProvider = ({
|
|
|
680
672
|
})
|
|
681
673
|
}, options), [webAuthMode, oxyServices, clientId, authorizeBaseUrl, isIdentityBound, user?.id]);
|
|
682
674
|
|
|
675
|
+
// On the web an Oxy app signs in and creates accounts in auth.oxy.so's
|
|
676
|
+
// window over the app, like "Sign in with Google": the passkey belongs to
|
|
677
|
+
// that origin, and the browser's session lives there, shared by every Oxy
|
|
678
|
+
// app. A blocked window falls back to the same page in this tab.
|
|
679
|
+
const continueOnAuth = (0, _react.useCallback)(screen => startWebOAuthSignInForContext({
|
|
680
|
+
redirectUri: authRedirectUri ?? globalThis.location?.origin ?? '',
|
|
681
|
+
transport: 'popup',
|
|
682
|
+
screen
|
|
683
|
+
}), [startWebOAuthSignInForContext, authRedirectUri]);
|
|
684
|
+
|
|
683
685
|
// ── Unified account dialog ─────────────────────────────────────────────────
|
|
684
686
|
// The single account-chooser + sign-in surface. Built ONCE per provider mount
|
|
685
687
|
// and bound to the live `oxyServices` + `sessionClient` + this provider's
|
|
@@ -749,11 +751,6 @@ const OxyRuntimeProvider = ({
|
|
|
749
751
|
// controller short-circuits, so `redirectToAuthorize` never runs for the
|
|
750
752
|
// `oxycommons://` payload.
|
|
751
753
|
canOpenApp: (0, _isWebBrowser.isWebBrowser)() ? undefined : url => _reactNative.Linking.canOpenURL(url),
|
|
752
|
-
// Web-only: lets `startPasskeyHubSignIn` open the auth.oxy.so passkey hub
|
|
753
|
-
// popup (b2) for a non-Oxy origin. `undefined` on native — there is no
|
|
754
|
-
// popup concept there, and off-origin passkey sign-in isn't reachable
|
|
755
|
-
// (Commons owns the native flow).
|
|
756
|
-
openPopup: (0, _isWebBrowser.isWebBrowser)() ? _passkeyHubPopup.openPasskeyHubPopup : undefined,
|
|
757
754
|
// Which surface a sign-in starts from — a FACT only this consumer can
|
|
758
755
|
// supply (headless core never touches a platform global). It decides
|
|
759
756
|
// whether automatic delivery may take the same-device Commons deep link;
|
|
@@ -874,7 +871,9 @@ const OxyRuntimeProvider = ({
|
|
|
874
871
|
username: opts?.username,
|
|
875
872
|
deviceId: persisted?.deviceId,
|
|
876
873
|
deviceName: opts?.deviceName,
|
|
877
|
-
|
|
874
|
+
// The same shape every other sign-in path sends; the server only reads it
|
|
875
|
+
// to place a device that has no persisted id yet.
|
|
876
|
+
deviceFingerprint: opts?.deviceFingerprint ?? JSON.stringify(_core.DeviceManager.getDeviceFingerprint())
|
|
878
877
|
});
|
|
879
878
|
}, [oxyServices, authStore, commitSession]);
|
|
880
879
|
|
|
@@ -1155,6 +1154,7 @@ const OxyRuntimeProvider = ({
|
|
|
1155
1154
|
revokeSuspiciousSignIn,
|
|
1156
1155
|
handleWebSession,
|
|
1157
1156
|
startWebOAuthSignIn: startWebOAuthSignInForContext,
|
|
1157
|
+
continueOnAuth,
|
|
1158
1158
|
requestOAuthConsent: requestOAuthConsentForContext,
|
|
1159
1159
|
logout,
|
|
1160
1160
|
logoutAll,
|
|
@@ -1182,7 +1182,7 @@ const OxyRuntimeProvider = ({
|
|
|
1182
1182
|
switchToAccount,
|
|
1183
1183
|
refreshAccounts,
|
|
1184
1184
|
createAccount: createAccountFn
|
|
1185
|
-
}), [user, sessions, activeSessionId, isAuthenticated, isLoading, tokenReady, hasAccessToken, canUsePrivateApi, isPrivateApiPending, authResolved, snapshot.storageReady, isIdentityBound, webAuthMode, error, currentLanguage, currentLanguages, currentLanguageMetadata, currentLanguageName, currentNativeLanguageName, hasIdentity, getPublicKey, signIn, signInWithPasskey, addPasskey, removePasskey, revokeSuspiciousSignIn, handleWebSession, startWebOAuthSignInForContext, requestOAuthConsentForContext, logout, logoutAll, switchSessionForContext, refreshSessionsForContext, setLanguage, getDeviceSessions, logoutAllDeviceSessions, updateDeviceName, clearSessionState, clearAllAccountData, storageKeyPrefix, clientId, oxyServices, sessionClient, showBottomSheetForContext, openAvatarPicker, accountDialogController, accountDialogOpen, openAccountDialog, closeAccountDialog, accounts, switchToAccount, refreshAccounts, createAccountFn]);
|
|
1185
|
+
}), [user, sessions, activeSessionId, isAuthenticated, isLoading, tokenReady, hasAccessToken, canUsePrivateApi, isPrivateApiPending, authResolved, snapshot.storageReady, isIdentityBound, webAuthMode, error, currentLanguage, currentLanguages, currentLanguageMetadata, currentLanguageName, currentNativeLanguageName, hasIdentity, getPublicKey, signIn, signInWithPasskey, addPasskey, removePasskey, revokeSuspiciousSignIn, handleWebSession, startWebOAuthSignInForContext, continueOnAuth, requestOAuthConsentForContext, logout, logoutAll, switchSessionForContext, refreshSessionsForContext, setLanguage, getDeviceSessions, logoutAllDeviceSessions, updateDeviceName, clearSessionState, clearAllAccountData, storageKeyPrefix, clientId, oxyServices, sessionClient, showBottomSheetForContext, openAvatarPicker, accountDialogController, accountDialogOpen, openAccountDialog, closeAccountDialog, accounts, switchToAccount, refreshAccounts, createAccountFn]);
|
|
1186
1186
|
const authActionsValue = (0, _react.useMemo)(() => ({
|
|
1187
1187
|
signIn,
|
|
1188
1188
|
logout,
|