@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
|
@@ -22,18 +22,15 @@
|
|
|
22
22
|
*/
|
|
23
23
|
|
|
24
24
|
import type React from 'react';
|
|
25
|
-
import { useCallback
|
|
25
|
+
import { useCallback } from 'react';
|
|
26
26
|
import { StyleSheet, View } from 'react-native';
|
|
27
|
-
import type { AccountDialogSnapshot } from '@oxy.so/core';
|
|
28
27
|
import { useOxy } from '../context/OxyContext';
|
|
29
28
|
import { useI18n } from '../hooks/useI18n';
|
|
30
29
|
import { useSurfaceHeader } from '../hooks/useSurfaceHeader';
|
|
31
30
|
import type { BaseScreenProps } from '../types/navigation';
|
|
32
31
|
import LogoText from './logo/LogoText';
|
|
33
32
|
import OxyAuthChooser from './OxyAuthChooser';
|
|
34
|
-
import {
|
|
35
|
-
|
|
36
|
-
type Translate = ReturnType<typeof useI18n>['t'];
|
|
33
|
+
import { useAccountDialogSnapshot } from '../hooks/accountDialogSnapshot';
|
|
37
34
|
|
|
38
35
|
/**
|
|
39
36
|
* The account MENU's nav bar carries the Oxy wordmark instead of a title — the
|
|
@@ -60,25 +57,9 @@ const OxyAccountDialogScreen: React.FC<BaseScreenProps> = ({ canGoBack }) => {
|
|
|
60
57
|
const { accountDialogController: controller, closeAccountDialog } = useOxy();
|
|
61
58
|
const { t } = useI18n();
|
|
62
59
|
|
|
63
|
-
|
|
64
|
-
// binds independently — cheap, and the established pattern here (
|
|
65
|
-
// `useDeviceSwitcher` also binds to this controller on its own).
|
|
66
|
-
const subscribe = useCallback(
|
|
67
|
-
(listener: () => void) => (controller ? controller.subscribe(listener) : () => undefined),
|
|
68
|
-
[controller],
|
|
69
|
-
);
|
|
70
|
-
const getSnapshot = useCallback(
|
|
71
|
-
() => (controller ? controller.getSnapshot() : EMPTY_ACCOUNT_DIALOG_SNAPSHOT),
|
|
72
|
-
[controller],
|
|
73
|
-
);
|
|
74
|
-
const snapshot = useSyncExternalStore(subscribe, getSnapshot, getSnapshot);
|
|
60
|
+
const snapshot = useAccountDialogSnapshot(controller);
|
|
75
61
|
|
|
76
62
|
const { view } = snapshot;
|
|
77
|
-
// Names the entry view "Add another account" rather than "Sign in" only when
|
|
78
|
-
// THIS app is signed in. Not the directory's size: the device can go on
|
|
79
|
-
// listing a shared identity (Commons') after the app signed out, and that
|
|
80
|
-
// titled a signed-out sheet "Add another account" (OxyHQ/oxy#1375 item 21).
|
|
81
|
-
const hasSignedInAccounts = snapshot.hasSession;
|
|
82
63
|
// Where back leads is the CONTROLLER's answer (`snapshot.backView`), never a
|
|
83
64
|
// table here: a host-side "back = accounts" assumed a signed-in origin and
|
|
84
65
|
// opened the account menu for nobody on a signed-out Back from sign-up.
|
|
@@ -93,18 +74,15 @@ const OxyAccountDialogScreen: React.FC<BaseScreenProps> = ({ canGoBack }) => {
|
|
|
93
74
|
// `closeAccountDialog` so the pop + state teardown stay in one place. Opened
|
|
94
75
|
// cold (detached) it is the root frame → `canGoBack` is false → no back.
|
|
95
76
|
const backsToHost = !showBack && (canGoBack?.() ?? false);
|
|
96
|
-
// The
|
|
97
|
-
//
|
|
98
|
-
//
|
|
99
|
-
//
|
|
100
|
-
//
|
|
101
|
-
// on scroll — because their copy is informative.
|
|
102
|
-
const copy = view === 'accounts' ? null : headerCopy(view, hasSignedInAccounts, t);
|
|
77
|
+
// The sign-in and sign-up screens carry their own header — the Oxy mark and
|
|
78
|
+
// the large title auth.oxy.so shows — so the bar holds only the way back.
|
|
79
|
+
// The account MENU is branded with the wordmark (the hero under it names the
|
|
80
|
+
// account); the active request is titled, route-agnostically, because Oxy
|
|
81
|
+
// picks how it travels (issue #691).
|
|
103
82
|
|
|
104
83
|
useSurfaceHeader({
|
|
105
|
-
titleContent:
|
|
106
|
-
title:
|
|
107
|
-
subtitle: copy?.subtitle ?? undefined,
|
|
84
|
+
titleContent: view === 'accounts' ? NAV_LOGO : undefined,
|
|
85
|
+
title: view === 'qr' ? t('accountSwitcher.signInWithOxy') : undefined,
|
|
108
86
|
onBack: showBack ? goBack : backsToHost ? closeAccountDialog : undefined,
|
|
109
87
|
});
|
|
110
88
|
|
|
@@ -119,45 +97,6 @@ const OxyAccountDialogScreen: React.FC<BaseScreenProps> = ({ canGoBack }) => {
|
|
|
119
97
|
);
|
|
120
98
|
};
|
|
121
99
|
|
|
122
|
-
// ---------------------------------------------------------------------------
|
|
123
|
-
// Copy + helpers
|
|
124
|
-
// ---------------------------------------------------------------------------
|
|
125
|
-
|
|
126
|
-
function headerCopy(
|
|
127
|
-
view: Exclude<AccountDialogSnapshot['view'], 'accounts'>,
|
|
128
|
-
hasSignedInAccounts: boolean,
|
|
129
|
-
t: Translate,
|
|
130
|
-
): { title: string; subtitle: string | null } {
|
|
131
|
-
switch (view) {
|
|
132
|
-
// The ACTIVE REQUEST. Its header is deliberately route-AGNOSTIC: Oxy picks
|
|
133
|
-
// the delivery route (QR here, a push to the user's phone, or opening
|
|
134
|
-
// Commons on this device — issue #691), so naming one of them in the bar
|
|
135
|
-
// would contradict the other two. The route-specific status line lives in
|
|
136
|
-
// the body, derived from `signIn.progress`, and is the only thing that
|
|
137
|
-
// describes HOW the request is travelling.
|
|
138
|
-
case 'qr':
|
|
139
|
-
return {
|
|
140
|
-
title: t('accountSwitcher.signInWithOxy') || 'Sign in with Oxy',
|
|
141
|
-
subtitle: null,
|
|
142
|
-
};
|
|
143
|
-
case 'signup':
|
|
144
|
-
return {
|
|
145
|
-
title: t('signup.title') || 'Create your account',
|
|
146
|
-
subtitle: t('signup.subtitle') || 'One identity for the whole ecosystem.',
|
|
147
|
-
};
|
|
148
|
-
default:
|
|
149
|
-
return hasSignedInAccounts
|
|
150
|
-
? {
|
|
151
|
-
title: t('signin.addAccountTitle') || 'Add another account',
|
|
152
|
-
subtitle: t('signin.addAccountSubtitle') || 'Sign in with another account.',
|
|
153
|
-
}
|
|
154
|
-
: {
|
|
155
|
-
title: t('signin.title') || 'Sign in',
|
|
156
|
-
subtitle: t('signin.subtitle') || 'One identity for the whole ecosystem.',
|
|
157
|
-
};
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
|
|
161
100
|
/**
|
|
162
101
|
* The screen gutter. In the Dialog's nav-header mode the surface adds NO content
|
|
163
102
|
* padding of its own — the large title and each screen own theirs — so this must
|
|
@@ -169,7 +108,7 @@ const SCREEN_MARGIN = 20;
|
|
|
169
108
|
const styles = StyleSheet.create({
|
|
170
109
|
bodyContent: {
|
|
171
110
|
paddingTop: 4,
|
|
172
|
-
paddingBottom:
|
|
111
|
+
paddingBottom: 20,
|
|
173
112
|
paddingHorizontal: SCREEN_MARGIN,
|
|
174
113
|
},
|
|
175
114
|
});
|
|
@@ -15,17 +15,16 @@
|
|
|
15
15
|
* responsibility each:
|
|
16
16
|
*
|
|
17
17
|
* - `accounts` → `AccountsMenuView` — the signed-in Oxy account menu.
|
|
18
|
-
* - `add` / `signin` → `
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
* (a QR on an unknown desktop, "Check Commons on your phone" where Oxy could
|
|
22
|
-
* deliver) IS the primary route there, never something behind a second tap.
|
|
18
|
+
* - `add` / `signin` → `OxySignInPanel` — THE sign-in screen, the one
|
|
19
|
+
* auth.oxy.so renders too: the device's accounts, then "Continue with
|
|
20
|
+
* Oxy" (on the web, auth.oxy.so's window over the app).
|
|
23
21
|
* - `qr` → `SignInRequestView` — the ACTIVE REQUEST: the controller-bound
|
|
24
22
|
* wiring over the shared, presentational `OxySignInRequestSurface` (the same
|
|
25
23
|
* component the auth.oxy.so IdP mounts from its OAuth-bound request). It maps
|
|
26
24
|
* `snapshot.signIn` onto that surface's props; alternatives stay behind
|
|
27
25
|
* "Having trouble?" until the chosen route reports `routeFailed`.
|
|
28
|
-
* - `signup` → `
|
|
26
|
+
* - `signup` → `OxySignUpPanel` — account creation: auth.oxy.so's window on
|
|
27
|
+
* the web, Commons on native.
|
|
29
28
|
*
|
|
30
29
|
* Per-account color re-theming uses Bloom's `APP_COLOR_PRESETS` + `BloomColorScope`
|
|
31
30
|
* (same visual language auth.oxy.so uses). Base theming is `useTheme()` + a
|
|
@@ -39,7 +38,7 @@ import { Linking, Platform } from 'react-native';
|
|
|
39
38
|
import { toast } from '@oxy.so/bloom/toast';
|
|
40
39
|
import { surfaces } from '@oxy.so/bloom/surfaces';
|
|
41
40
|
import { useTheme } from '@oxy.so/bloom/theme';
|
|
42
|
-
import {
|
|
41
|
+
import { getNormalizedUserHandle, type OxyAuthScreen, type User } from '@oxy.so/core';
|
|
43
42
|
import { useQueryClient } from '@tanstack/react-query';
|
|
44
43
|
import { useOxy } from '../context/OxyContext';
|
|
45
44
|
import { useDeviceSwitcher } from '../hooks/useDeviceSwitcher';
|
|
@@ -52,9 +51,7 @@ import { isWebBrowser } from '../utils/isWebBrowser';
|
|
|
52
51
|
import { getCommonsAcquisitionUrl } from '../utils/commonsStoreLinks';
|
|
53
52
|
import { useAccountStorageUsage } from '../hooks/queries/useServicesQueries';
|
|
54
53
|
import AccountsMenuView from './authChooser/AccountsMenuView';
|
|
55
|
-
import SignInEntryView from './authChooser/SignInEntryView';
|
|
56
54
|
import SignInRequestView from './authChooser/SignInRequestView';
|
|
57
|
-
import SignUpView from './authChooser/SignUpView';
|
|
58
55
|
import { signInFailureMessage } from './authChooser/signInFailureMessage';
|
|
59
56
|
import {
|
|
60
57
|
resolveAccentHex,
|
|
@@ -66,9 +63,9 @@ import {
|
|
|
66
63
|
type SignInAlternatives,
|
|
67
64
|
} from './authChooser/types';
|
|
68
65
|
import { EMPTY_ACCOUNT_DIALOG_SNAPSHOT } from '../hooks/accountDialogSnapshot';
|
|
66
|
+
import { OxySignInPanel } from './signIn/OxySignInPanel';
|
|
67
|
+
import { OxySignUpPanel } from './signIn/OxySignUpPanel';
|
|
69
68
|
|
|
70
|
-
/** Commons' own identity-creation deep link (mirrors the `approve`/`attest`/`card` intents). */
|
|
71
|
-
const COMMONS_CREATE_IDENTITY_URL = 'oxycommons://create-identity';
|
|
72
69
|
/**
|
|
73
70
|
* "Accounts by Oxy" management app — the canonical home for account settings,
|
|
74
71
|
* data export, and storage management. The account-menu rows deep-link into it
|
|
@@ -90,12 +87,6 @@ const toastedFailureAttempt = new WeakMap<object, number>();
|
|
|
90
87
|
export interface OxyAuthChooserProps {
|
|
91
88
|
/** Called after a completed switch, sign-in, or sign-up. */
|
|
92
89
|
onComplete?: () => void;
|
|
93
|
-
/**
|
|
94
|
-
* @deprecated No effect. The web sign-in entry no longer auto-starts a
|
|
95
|
-
* device-flow request: its primary action opens the identity origin
|
|
96
|
-
* (`id.oxy.so`) in a popup, which a browser only allows from a user gesture.
|
|
97
|
-
*/
|
|
98
|
-
autoStartSignIn?: boolean;
|
|
99
90
|
}
|
|
100
91
|
|
|
101
92
|
/**
|
|
@@ -111,6 +102,7 @@ const OxyAuthChooser: React.FC<OxyAuthChooserProps> = ({ onComplete }) => {
|
|
|
111
102
|
logout,
|
|
112
103
|
openAvatarPicker,
|
|
113
104
|
user,
|
|
105
|
+
continueOnAuth,
|
|
114
106
|
} = useOxy();
|
|
115
107
|
const theme = useTheme();
|
|
116
108
|
const { t } = useI18n();
|
|
@@ -120,13 +112,23 @@ const OxyAuthChooser: React.FC<OxyAuthChooserProps> = ({ onComplete }) => {
|
|
|
120
112
|
// so the two switchers cannot drift.
|
|
121
113
|
const { principals } = useDeviceSwitcher();
|
|
122
114
|
|
|
123
|
-
//
|
|
124
|
-
//
|
|
125
|
-
//
|
|
126
|
-
//
|
|
127
|
-
// no passkey path: Commons owns identity there ('none').
|
|
115
|
+
// On the web every sign-in and sign-up runs in auth.oxy.so's window over the
|
|
116
|
+
// app (`continueOnAuth`): the passkey belongs to that origin, and the
|
|
117
|
+
// browser's session lives there, shared by every Oxy app. Native has no
|
|
118
|
+
// passkey path: Commons owns identity there ('none').
|
|
128
119
|
const passkeyMode = useMemo<PasskeyMode>(() => (isWebBrowser() ? 'hub' : 'none'), []);
|
|
129
120
|
|
|
121
|
+
/** auth.oxy.so's window; this surface closes once it signs the app in. */
|
|
122
|
+
const openOnOxy = useCallback(
|
|
123
|
+
(screen: OxyAuthScreen) => {
|
|
124
|
+
void continueOnAuth(screen).then((result) => {
|
|
125
|
+
if (result.status === 'signed-in') onComplete?.();
|
|
126
|
+
else if (result.status === 'failed') toast.error(t('signin.errors.failed'));
|
|
127
|
+
});
|
|
128
|
+
},
|
|
129
|
+
[continueOnAuth, onComplete, t],
|
|
130
|
+
);
|
|
131
|
+
|
|
130
132
|
// Bind the headless controller. `getSnapshot` returns a stable reference
|
|
131
133
|
// between changes, so it is `useSyncExternalStore`-safe. Guard the no-provider
|
|
132
134
|
// loading state (`controller` is `null`) with an inert store.
|
|
@@ -140,7 +142,8 @@ const OxyAuthChooser: React.FC<OxyAuthChooserProps> = ({ onComplete }) => {
|
|
|
140
142
|
if (!controller) return () => undefined;
|
|
141
143
|
const maybeToastSignInError = () => {
|
|
142
144
|
const { signIn } = controller.getSnapshot();
|
|
143
|
-
|
|
145
|
+
// The embedded QR's failures are its own to handle (it renews itself).
|
|
146
|
+
if (signIn.phase !== 'error' || signIn.inline) return;
|
|
144
147
|
if (toastedFailureAttempt.get(controller) === signIn.attempt) return;
|
|
145
148
|
toastedFailureAttempt.set(controller, signIn.attempt);
|
|
146
149
|
const message = signInFailureMessage(signIn.failure, t);
|
|
@@ -363,18 +366,14 @@ const OxyAuthChooser: React.FC<OxyAuthChooserProps> = ({ onComplete }) => {
|
|
|
363
366
|
const alternatives = useMemo<SignInAlternatives>(
|
|
364
367
|
() => ({
|
|
365
368
|
passkeyAvailable: passkeyMode !== 'none',
|
|
366
|
-
//
|
|
367
|
-
onSignInWithPasskey: () =>
|
|
369
|
+
// auth.oxy.so asserts the passkey, in its window.
|
|
370
|
+
onSignInWithPasskey: () => openOnOxy('signin'),
|
|
368
371
|
onShowQr: () => void controller?.showQr(),
|
|
369
372
|
onGetCommons: () => openExternal(getCommonsAcquisitionUrl(Platform.OS)),
|
|
370
|
-
// Web: the
|
|
371
|
-
|
|
372
|
-
onCreateAccount: () => {
|
|
373
|
-
if (passkeyMode === 'hub') void controller?.startPasskeyHubSignIn();
|
|
374
|
-
else controller?.startSignup();
|
|
375
|
-
},
|
|
373
|
+
// Web: the account is made on auth.oxy.so. Native: Commons makes it.
|
|
374
|
+
onCreateAccount: () => (passkeyMode === 'hub' ? openOnOxy('signup') : controller?.startSignup()),
|
|
376
375
|
}),
|
|
377
|
-
[passkeyMode, controller, openExternal],
|
|
376
|
+
[passkeyMode, controller, openExternal, openOnOxy],
|
|
378
377
|
);
|
|
379
378
|
|
|
380
379
|
// Real storage usage for the account menu's "Oxy storage" block. Disabled
|
|
@@ -420,7 +419,6 @@ const OxyAuthChooser: React.FC<OxyAuthChooserProps> = ({ onComplete }) => {
|
|
|
420
419
|
onSignOut: () => {
|
|
421
420
|
void handleSignOut();
|
|
422
421
|
},
|
|
423
|
-
onOpenIdentity: passkeyMode === 'hub' ? () => openUrl(`${IDENTITY_WEB_ORIGIN}/`) : undefined,
|
|
424
422
|
customItems: (consumerHooks?.menuItems ?? []).map((item) => ({
|
|
425
423
|
...item,
|
|
426
424
|
onPress: () => {
|
|
@@ -429,7 +427,7 @@ const OxyAuthChooser: React.FC<OxyAuthChooserProps> = ({ onComplete }) => {
|
|
|
429
427
|
},
|
|
430
428
|
})),
|
|
431
429
|
};
|
|
432
|
-
}, [consumerHooks, onComplete, showBottomSheet, handleSignOut, openExternal
|
|
430
|
+
}, [consumerHooks, onComplete, showBottomSheet, handleSignOut, openExternal]);
|
|
433
431
|
|
|
434
432
|
if (!controller) {
|
|
435
433
|
return null;
|
|
@@ -462,29 +460,14 @@ const OxyAuthChooser: React.FC<OxyAuthChooserProps> = ({ onComplete }) => {
|
|
|
462
460
|
}
|
|
463
461
|
|
|
464
462
|
if (view === 'signup') {
|
|
465
|
-
return (
|
|
466
|
-
<SignUpView
|
|
467
|
-
snapshot={snapshot}
|
|
468
|
-
theme={theme}
|
|
469
|
-
t={t}
|
|
470
|
-
passkeyMode={passkeyMode}
|
|
471
|
-
onOpenHub={() => void controller.startPasskeyHubSignIn()}
|
|
472
|
-
onCreateIdentityInCommons={() => openExternal(COMMONS_CREATE_IDENTITY_URL)}
|
|
473
|
-
onGetCommons={alternatives.onGetCommons}
|
|
474
|
-
onBackToSignIn={() => controller.setView('signin')}
|
|
475
|
-
/>
|
|
476
|
-
);
|
|
463
|
+
return <OxySignUpPanel onSignIn={() => controller.setView('signin')} onCreateOnWeb={() => openOnOxy('signup')} />;
|
|
477
464
|
}
|
|
478
465
|
|
|
479
466
|
return (
|
|
480
|
-
<
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
t={t}
|
|
485
|
-
handlers={handlers}
|
|
486
|
-
onContinueWithOxy={() => void controller.signInWithOxy()}
|
|
487
|
-
alternatives={alternatives}
|
|
467
|
+
<OxySignInPanel
|
|
468
|
+
host="dialog"
|
|
469
|
+
onSignedIn={() => onComplete?.()}
|
|
470
|
+
onCreateAccount={alternatives.onCreateAccount}
|
|
488
471
|
/>
|
|
489
472
|
);
|
|
490
473
|
};
|
|
@@ -90,7 +90,6 @@ const OxyProvider: FC<OxyProviderProps> = ({
|
|
|
90
90
|
queryClient: providedQueryClient,
|
|
91
91
|
requireAuth = 'off',
|
|
92
92
|
backgroundSession = false,
|
|
93
|
-
deviceCredentialStorage = 'persistent',
|
|
94
93
|
language,
|
|
95
94
|
}) => {
|
|
96
95
|
|
|
@@ -240,7 +239,6 @@ const OxyProvider: FC<OxyProviderProps> = ({
|
|
|
240
239
|
sessionMode={sessionMode}
|
|
241
240
|
webAuthMode={webAuthMode}
|
|
242
241
|
backgroundSession={backgroundSession}
|
|
243
|
-
deviceCredentialStorage={deviceCredentialStorage}
|
|
244
242
|
platformStorage={platformStorage}
|
|
245
243
|
onAuthStateChange={onAuthStateChange as OxyRuntimeProviderProps['onAuthStateChange']}
|
|
246
244
|
>
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
import { useCallback, useEffect, useMemo } from 'react';
|
|
3
|
-
import {
|
|
4
|
-
type StyleProp,
|
|
5
|
-
type ViewStyle,
|
|
6
|
-
} from 'react-native';
|
|
3
|
+
import type { StyleProp, ViewStyle } from 'react-native';
|
|
7
4
|
import { View } from 'react-native-css/components';
|
|
8
5
|
import { RiLoginBoxLine } from '@oxy.so/bloom/icons/RiLoginBoxLine';
|
|
9
6
|
import { RiMoreLine } from '@oxy.so/bloom/icons/RiMoreLine';
|
|
@@ -51,7 +51,6 @@ import {
|
|
|
51
51
|
type SwitcherPrincipalRow,
|
|
52
52
|
} from '@oxy.so/core';
|
|
53
53
|
import AvatarCameraBadge from '../AvatarCameraBadge';
|
|
54
|
-
import { HoverPressable } from './primitives';
|
|
55
54
|
import { authChooserStyles as styles } from './styles';
|
|
56
55
|
import {
|
|
57
56
|
resolveAccentHex,
|
|
@@ -63,6 +62,34 @@ import {
|
|
|
63
62
|
type Translate,
|
|
64
63
|
} from './types';
|
|
65
64
|
|
|
65
|
+
type HoverPressableProps = Omit<React.ComponentProps<typeof Pressable>, 'className'> & {
|
|
66
|
+
baseClassName: string;
|
|
67
|
+
hoverClassName: string;
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* A `Pressable` that appends a hover-tint NativeWind token while pointer-hovered.
|
|
72
|
+
* The Metro web pipeline here does NOT emit NativeWind `hover:` variants, so hover
|
|
73
|
+
* is driven by RN's cross-platform `onHoverIn`/`onHoverOut` (they fire only on web
|
|
74
|
+
* via react-native-web; a no-op on native) toggling a plain background token —
|
|
75
|
+
* the tint stays a NativeWind class, only the trigger is JS.
|
|
76
|
+
*/
|
|
77
|
+
const HoverPressable: React.FC<HoverPressableProps> = ({
|
|
78
|
+
baseClassName,
|
|
79
|
+
hoverClassName,
|
|
80
|
+
...rest
|
|
81
|
+
}) => {
|
|
82
|
+
const [hovered, setHovered] = useState(false);
|
|
83
|
+
return (
|
|
84
|
+
<Pressable
|
|
85
|
+
{...rest}
|
|
86
|
+
className={hovered ? `${baseClassName} ${hoverClassName}` : baseClassName}
|
|
87
|
+
onHoverIn={() => setHovered(true)}
|
|
88
|
+
onHoverOut={() => setHovered(false)}
|
|
89
|
+
/>
|
|
90
|
+
);
|
|
91
|
+
};
|
|
92
|
+
|
|
66
93
|
/**
|
|
67
94
|
* Leading glyph for the rows that live in a Bloom grouped section (the MENU
|
|
68
95
|
* block) and for the storage card's cloud, which lines its title up with them.
|
|
@@ -477,13 +504,6 @@ const AccountsMenuView: React.FC<AccountsMenuViewProps> = ({
|
|
|
477
504
|
title={t('accountMenu.settings')}
|
|
478
505
|
onPress={menu.onOpenSettings}
|
|
479
506
|
/>
|
|
480
|
-
{menu.onOpenIdentity ? (
|
|
481
|
-
<SettingsListItem
|
|
482
|
-
icon={<MenuIcon name="shield-account-outline" theme={theme} />}
|
|
483
|
-
title={t('accountMenu.identity')}
|
|
484
|
-
onPress={menu.onOpenIdentity}
|
|
485
|
-
/>
|
|
486
|
-
) : null}
|
|
487
507
|
<SettingsListItem
|
|
488
508
|
icon={<MenuIcon name="help-circle-outline" theme={theme} />}
|
|
489
509
|
title={t('accountMenu.help')}
|
|
@@ -5,8 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import type React from 'react';
|
|
8
|
-
import {
|
|
9
|
-
import { Pressable, View } from 'react-native-css/components';
|
|
8
|
+
import { Pressable, View } from 'react-native';
|
|
10
9
|
import MaterialCommunityIcons from '../../icons/MaterialCommunityIcons';
|
|
11
10
|
import { Avatar } from '@oxy.so/bloom/avatar';
|
|
12
11
|
import { BloomColorScope } from '@oxy.so/bloom/theme';
|
|
@@ -18,34 +17,6 @@ import { resolveAccentHex, toPreset, type Theme } from './types';
|
|
|
18
17
|
/** Diameter of a row avatar (the sign-in view's account rows). */
|
|
19
18
|
const ROW_AVATAR_SIZE = 40;
|
|
20
19
|
|
|
21
|
-
type HoverPressableProps = Omit<React.ComponentProps<typeof Pressable>, 'className'> & {
|
|
22
|
-
baseClassName: string;
|
|
23
|
-
hoverClassName: string;
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* A `Pressable` that appends a hover-tint NativeWind token while pointer-hovered.
|
|
28
|
-
* The Metro web pipeline here does NOT emit NativeWind `hover:` variants, so hover
|
|
29
|
-
* is driven by RN's cross-platform `onHoverIn`/`onHoverOut` (they fire only on web
|
|
30
|
-
* via react-native-web; a no-op on native) toggling a plain background token —
|
|
31
|
-
* the tint stays a NativeWind class, only the trigger is JS.
|
|
32
|
-
*/
|
|
33
|
-
export const HoverPressable: React.FC<HoverPressableProps> = ({
|
|
34
|
-
baseClassName,
|
|
35
|
-
hoverClassName,
|
|
36
|
-
...rest
|
|
37
|
-
}) => {
|
|
38
|
-
const [hovered, setHovered] = useState(false);
|
|
39
|
-
return (
|
|
40
|
-
<Pressable
|
|
41
|
-
{...rest}
|
|
42
|
-
className={hovered ? `${baseClassName} ${hoverClassName}` : baseClassName}
|
|
43
|
-
onHoverIn={() => setHovered(true)}
|
|
44
|
-
onHoverOut={() => setHovered(false)}
|
|
45
|
-
/>
|
|
46
|
-
);
|
|
47
|
-
};
|
|
48
|
-
|
|
49
20
|
/**
|
|
50
21
|
* A SUBORDINATE action: a small centred text link, never a button.
|
|
51
22
|
*
|
|
@@ -73,15 +44,6 @@ export const SubtleLink: React.FC<{
|
|
|
73
44
|
</Pressable>
|
|
74
45
|
);
|
|
75
46
|
|
|
76
|
-
/** A labelled hairline separating two blocks ("or"). */
|
|
77
|
-
export const Dividerish: React.FC<{ theme: Theme; label: string }> = ({ theme, label }) => (
|
|
78
|
-
<View style={styles.dividerRow}>
|
|
79
|
-
<View style={[styles.dividerLine, { backgroundColor: theme.colors.border }]} />
|
|
80
|
-
<Text style={[styles.dividerText, { color: theme.colors.textSecondary }]}>{label}</Text>
|
|
81
|
-
<View style={[styles.dividerLine, { backgroundColor: theme.colors.border }]} />
|
|
82
|
-
</View>
|
|
83
|
-
);
|
|
84
|
-
|
|
85
47
|
/**
|
|
86
48
|
* A `principal acting as account` row on the sign-in entry — "continue as one of
|
|
87
49
|
* these" rather than a choice of authentication METHOD, which is why it stays
|
|
@@ -9,18 +9,12 @@
|
|
|
9
9
|
import type { SignInFailureReason } from '@oxy.so/core';
|
|
10
10
|
import type { Translate } from './types';
|
|
11
11
|
|
|
12
|
-
/**
|
|
13
|
-
* The toast for `failure`, or `null` when there is nothing to report: a
|
|
14
|
-
* `'cancelled'` attempt is the user's own choice (they closed the window), and
|
|
15
|
-
* the surface already offers "Try again" without scolding them for it.
|
|
16
|
-
*/
|
|
12
|
+
/** The toast for `failure`, or `null` when there is nothing to report. */
|
|
17
13
|
export function signInFailureMessage(
|
|
18
14
|
failure: SignInFailureReason | null,
|
|
19
15
|
t: Translate,
|
|
20
16
|
): string | null {
|
|
21
17
|
switch (failure) {
|
|
22
|
-
case 'cancelled':
|
|
23
|
-
return null;
|
|
24
18
|
case 'denied':
|
|
25
19
|
return t('accountSwitcher.signInFailures.denied');
|
|
26
20
|
case 'expired':
|
|
@@ -140,42 +140,11 @@ export const authChooserStyles = StyleSheet.create({
|
|
|
140
140
|
fontSize: 14,
|
|
141
141
|
fontWeight: '600',
|
|
142
142
|
},
|
|
143
|
-
signInBlock: {
|
|
144
|
-
width: '100%',
|
|
145
|
-
},
|
|
146
143
|
primaryButton: {
|
|
147
144
|
width: '100%',
|
|
148
145
|
borderRadius: 14,
|
|
149
146
|
marginTop: 8,
|
|
150
147
|
},
|
|
151
|
-
secondaryButton: {
|
|
152
|
-
width: '100%',
|
|
153
|
-
borderRadius: 14,
|
|
154
|
-
marginTop: 10,
|
|
155
|
-
},
|
|
156
|
-
usernameInput: {
|
|
157
|
-
width: '100%',
|
|
158
|
-
borderWidth: StyleSheet.hairlineWidth,
|
|
159
|
-
borderRadius: 14,
|
|
160
|
-
paddingVertical: 12,
|
|
161
|
-
paddingHorizontal: 14,
|
|
162
|
-
fontSize: 16,
|
|
163
|
-
marginTop: 8,
|
|
164
|
-
},
|
|
165
|
-
dividerRow: {
|
|
166
|
-
flexDirection: 'row',
|
|
167
|
-
alignItems: 'center',
|
|
168
|
-
width: '100%',
|
|
169
|
-
marginVertical: 14,
|
|
170
|
-
},
|
|
171
|
-
dividerLine: {
|
|
172
|
-
flex: 1,
|
|
173
|
-
height: StyleSheet.hairlineWidth,
|
|
174
|
-
},
|
|
175
|
-
dividerText: {
|
|
176
|
-
marginHorizontal: 12,
|
|
177
|
-
fontSize: 13,
|
|
178
|
-
},
|
|
179
148
|
centeredBlock: {
|
|
180
149
|
alignItems: 'center',
|
|
181
150
|
justifyContent: 'center',
|
|
@@ -95,11 +95,6 @@ export interface AccountsMenuActions {
|
|
|
95
95
|
onPrivacy: () => void;
|
|
96
96
|
onTerms: () => void;
|
|
97
97
|
onSignOut: () => void;
|
|
98
|
-
/**
|
|
99
|
-
* Open the person's identity at the identity origin (recovery phrase,
|
|
100
|
-
* recovery, account deletion). Web only — `undefined` hides the row.
|
|
101
|
-
*/
|
|
102
|
-
onOpenIdentity?: () => void;
|
|
103
98
|
customItems: readonly {
|
|
104
99
|
key: string;
|
|
105
100
|
label: string;
|
|
@@ -111,8 +106,8 @@ export interface AccountsMenuActions {
|
|
|
111
106
|
/**
|
|
112
107
|
* Where a passkey sign-in or sign-up can run from the current surface.
|
|
113
108
|
*
|
|
114
|
-
* `'hub'` = web: it runs
|
|
115
|
-
* every web origin
|
|
109
|
+
* `'hub'` = web: it runs in auth.oxy.so's window over the app
|
|
110
|
+
* (`continueOnAuth`), on every web origin.
|
|
116
111
|
* `'none'` = native, where Commons owns identity.
|
|
117
112
|
*/
|
|
118
113
|
export type PasskeyMode = 'hub' | 'none';
|
|
@@ -52,7 +52,7 @@ export interface OpenAuthorizeOptions {
|
|
|
52
52
|
* (see `normalizeOAuthRedirectUri`), so the IdP always returns the tab to `/`,
|
|
53
53
|
* and the return handlers restore this path. Doing it here rather than at each
|
|
54
54
|
* call site is deliberate: every web authorize redirect — silent restore,
|
|
55
|
-
* interactive sign-in,
|
|
55
|
+
* interactive sign-in, `continueOnAuth` — funnels through this function, so a
|
|
56
56
|
* new flow cannot forget to preserve the page the visitor came from.
|
|
57
57
|
*/
|
|
58
58
|
export function redirectToAuthorize(url: string): void {
|