@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,366 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* THE Oxy sign-in screen. The account dialog every Oxy app opens and the
|
|
5
|
+
* auth.oxy.so page render this one component; only where it is mounted
|
|
6
|
+
* differs (`host`).
|
|
7
|
+
*
|
|
8
|
+
* picker a returning device: "Choose an account", then "Use another account"
|
|
9
|
+
* entry the header, the Commons way in, and the way in for someone with no
|
|
10
|
+
* account. On auth.oxy.so (`page`) also the username with its
|
|
11
|
+
* Continue — a username-first passkey sign-in, which takes a
|
|
12
|
+
* platform passkey AND a hardware security key with no resident
|
|
13
|
+
* credential (a U2F key such as a Titan) — and "or continue with" the
|
|
14
|
+
* discoverable passkey. From `md` that page is Bloom `AuthCard`'s
|
|
15
|
+
* split card, with the embedded QR over its photo carousel in the
|
|
16
|
+
* right column; below `md` it is "Continue with Oxy" at the top.
|
|
17
|
+
* In an app's dialog on the web, "Continue with Oxy" opens that page
|
|
18
|
+
* in a window over the app, like "Sign in with Google": the browser's
|
|
19
|
+
* session lives on auth.oxy.so, so every Oxy app shares it. On
|
|
20
|
+
* native it is "Continue with Oxy" ("Get Commons" without Commons).
|
|
21
|
+
*
|
|
22
|
+
* `signInMethods.ts` owns which blocks a platform gets.
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
import { useCallback, useEffect, useState } from 'react';
|
|
26
|
+
import { Linking, Platform, Text as RNText, StyleSheet, View } from 'react-native';
|
|
27
|
+
import { View as CssView } from 'react-native-css/components';
|
|
28
|
+
import { AuthMediaCarousel } from '@oxy.so/bloom/auth-card';
|
|
29
|
+
import { Button } from '@oxy.so/bloom/button';
|
|
30
|
+
import { Divider } from '@oxy.so/bloom/divider';
|
|
31
|
+
import { RiKey2Line } from '@oxy.so/bloom/icons/RiKey2Line';
|
|
32
|
+
import { RiQrCodeLine } from '@oxy.so/bloom/icons/RiQrCodeLine';
|
|
33
|
+
import { useTheme } from '@oxy.so/bloom/theme';
|
|
34
|
+
import { TextField, TextFieldHint, TextFieldInput, TextFieldLabel } from '@oxy.so/bloom/text-field';
|
|
35
|
+
import { toast } from '@oxy.so/bloom/toast';
|
|
36
|
+
import { Text } from '@oxy.so/bloom/typography';
|
|
37
|
+
import { useQueryClient } from '@tanstack/react-query';
|
|
38
|
+
import { useOxy } from "../../context/OxyContext.js";
|
|
39
|
+
import { useAccountDialogSnapshot } from "../../hooks/accountDialogSnapshot.js";
|
|
40
|
+
import { useDeviceSwitcher } from "../../hooks/useDeviceSwitcher.js";
|
|
41
|
+
import { useI18n } from "../../hooks/useI18n.js";
|
|
42
|
+
import { getCommonsAcquisitionUrl } from "../../utils/commonsStoreLinks.js";
|
|
43
|
+
import { isWebBrowser } from "../../utils/isWebBrowser.js";
|
|
44
|
+
import { SubtleLink } from "../authChooser/primitives.js";
|
|
45
|
+
import { SIGN_IN_SLIDES } from "./artwork.js";
|
|
46
|
+
import { InlineCommonsQr } from "./InlineCommonsQr.js";
|
|
47
|
+
import { OxyAccountPicker } from "./OxyAccountPicker.js";
|
|
48
|
+
import { OxyAuthScreen, OxyAuthScreenHeader, OxyAuthSplit, OxyAuthTerms } from "./OxyAuthScreen.js";
|
|
49
|
+
import { RATE_LIMIT_SECONDS, describePasskeyError, isRateLimited } from "./passkeyError.js";
|
|
50
|
+
import { resolveSignInMethods } from "./signInMethods.js";
|
|
51
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
52
|
+
export const OxySignInPanel = ({
|
|
53
|
+
onSignedIn,
|
|
54
|
+
onCreateAccount,
|
|
55
|
+
onRecover,
|
|
56
|
+
loginHint,
|
|
57
|
+
appName = null,
|
|
58
|
+
host = 'page'
|
|
59
|
+
}) => {
|
|
60
|
+
const theme = useTheme();
|
|
61
|
+
const {
|
|
62
|
+
t
|
|
63
|
+
} = useI18n();
|
|
64
|
+
const queryClient = useQueryClient();
|
|
65
|
+
const {
|
|
66
|
+
accountDialogController: controller,
|
|
67
|
+
openAccountDialog,
|
|
68
|
+
signInWithPasskey,
|
|
69
|
+
continueOnAuth
|
|
70
|
+
} = useOxy();
|
|
71
|
+
const snapshot = useAccountDialogSnapshot(controller);
|
|
72
|
+
const {
|
|
73
|
+
principals,
|
|
74
|
+
activeContext
|
|
75
|
+
} = useDeviceSwitcher();
|
|
76
|
+
const methods = resolveSignInMethods({
|
|
77
|
+
web: isWebBrowser(),
|
|
78
|
+
host,
|
|
79
|
+
commonsAvailability: snapshot.commonsAvailability
|
|
80
|
+
});
|
|
81
|
+
const [showForm, setShowForm] = useState(Boolean(loginHint));
|
|
82
|
+
const [identifier, setIdentifier] = useState(loginHint ?? '');
|
|
83
|
+
const [pending, setPending] = useState(false);
|
|
84
|
+
const [error, setError] = useState(null);
|
|
85
|
+
const [rateLimitSeconds, setRateLimitSeconds] = useState(0);
|
|
86
|
+
const blocked = pending || rateLimitSeconds > 0;
|
|
87
|
+
|
|
88
|
+
// The countdown after a 429: one tick a second until the person may retry.
|
|
89
|
+
useEffect(() => {
|
|
90
|
+
if (rateLimitSeconds <= 0) return;
|
|
91
|
+
const timer = setTimeout(() => setRateLimitSeconds(seconds => Math.max(0, seconds - 1)), 1000);
|
|
92
|
+
return () => clearTimeout(timer);
|
|
93
|
+
}, [rateLimitSeconds]);
|
|
94
|
+
|
|
95
|
+
// On a page, a request the controller runs (the embedded QR, or one shown in
|
|
96
|
+
// the dialog opened over it) finishes the page's sign-in too. Only one that
|
|
97
|
+
// STARTED here: a completion already on the controller is somebody else's.
|
|
98
|
+
const [mountedAttempt] = useState(snapshot.signIn.attempt);
|
|
99
|
+
const completedHere = snapshot.signIn.phase === 'completed' && snapshot.signIn.attempt !== mountedAttempt;
|
|
100
|
+
useEffect(() => {
|
|
101
|
+
if (host === 'page' && completedHere) onSignedIn();
|
|
102
|
+
}, [host, completedHere, onSignedIn]);
|
|
103
|
+
|
|
104
|
+
/** Show the request a controller call just started — the dialog is where it lives. */
|
|
105
|
+
const showRequest = useCallback(() => {
|
|
106
|
+
if (host === 'page') openAccountDialog('qr');
|
|
107
|
+
}, [host, openAccountDialog]);
|
|
108
|
+
|
|
109
|
+
// These open a window or leave the page, so they run straight from the
|
|
110
|
+
// press, before any await.
|
|
111
|
+
const continueWithOxy = () => {
|
|
112
|
+
void controller?.signInWithOxy();
|
|
113
|
+
showRequest();
|
|
114
|
+
};
|
|
115
|
+
const signInOnOxy = () => {
|
|
116
|
+
void continueOnAuth('signin').then(result => {
|
|
117
|
+
if (result.status === 'signed-in') onSignedIn();else if (result.status === 'failed') toast.error(t('signin.errors.failed'));
|
|
118
|
+
});
|
|
119
|
+
};
|
|
120
|
+
const useAnotherDevice = () => {
|
|
121
|
+
void controller?.showQr();
|
|
122
|
+
showRequest();
|
|
123
|
+
};
|
|
124
|
+
const getCommons = () => {
|
|
125
|
+
Promise.resolve().then(() => Linking.openURL(getCommonsAcquisitionUrl(Platform.OS))).catch(() => toast.error(t('accountSwitcher.linkOpenFailed')));
|
|
126
|
+
};
|
|
127
|
+
const runPasskey = async (username, failToast) => {
|
|
128
|
+
if (blocked) return;
|
|
129
|
+
setError(null);
|
|
130
|
+
setPending(true);
|
|
131
|
+
try {
|
|
132
|
+
await signInWithPasskey({
|
|
133
|
+
username
|
|
134
|
+
});
|
|
135
|
+
onSignedIn();
|
|
136
|
+
} catch (err) {
|
|
137
|
+
if (isRateLimited(err)) {
|
|
138
|
+
setRateLimitSeconds(RATE_LIMIT_SECONDS);
|
|
139
|
+
} else {
|
|
140
|
+
const message = describePasskeyError(err, t);
|
|
141
|
+
setError(message);
|
|
142
|
+
toast.error(failToast, {
|
|
143
|
+
description: message
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
} finally {
|
|
147
|
+
setPending(false);
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
const submitUsername = () => {
|
|
151
|
+
const username = identifier.trim();
|
|
152
|
+
if (username) void runPasskey(username, t('signin.errors.failed'));else setError(t('signin.username.required'));
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
// A returning device starts at WHO. Not while adding an account from inside
|
|
156
|
+
// a signed-in app: the rows are the accounts it would add.
|
|
157
|
+
const pickerAllowed = host === 'dialog' ? !snapshot.hasSession : activeContext !== null;
|
|
158
|
+
const reauthenticate = context => {
|
|
159
|
+
setIdentifier(context.handle ?? '');
|
|
160
|
+
setShowForm(true);
|
|
161
|
+
};
|
|
162
|
+
const selectContext = async context => {
|
|
163
|
+
const outcome = await controller?.chooseContext(context.contextId).catch(() => 'failed');
|
|
164
|
+
switch (outcome) {
|
|
165
|
+
case 'switched':
|
|
166
|
+
// Every account-scoped query now describes somebody else.
|
|
167
|
+
void queryClient.invalidateQueries();
|
|
168
|
+
onSignedIn();
|
|
169
|
+
return;
|
|
170
|
+
case 'current':
|
|
171
|
+
onSignedIn();
|
|
172
|
+
return;
|
|
173
|
+
case 'signing-in':
|
|
174
|
+
// The request for that account is running; it shows where requests do.
|
|
175
|
+
showRequest();
|
|
176
|
+
return;
|
|
177
|
+
case 'failed':
|
|
178
|
+
// The pair could not be activated as it stands: sign in as it explicitly.
|
|
179
|
+
if (methods.passkey && context.handle) reauthenticate(context);else toast.error(t('accountSwitcher.toasts.activateFailed'));
|
|
180
|
+
return;
|
|
181
|
+
default:
|
|
182
|
+
return;
|
|
183
|
+
}
|
|
184
|
+
};
|
|
185
|
+
const showsPicker = pickerAllowed && !showForm && principals.length > 0;
|
|
186
|
+
// auth.oxy.so's page is the split card from `md`.
|
|
187
|
+
const splits = methods.commons === 'qr';
|
|
188
|
+
if (showsPicker) {
|
|
189
|
+
return /*#__PURE__*/_jsx(OxyAccountPicker, {
|
|
190
|
+
principals: principals,
|
|
191
|
+
appName: appName,
|
|
192
|
+
signedOut: !snapshot.hasSession,
|
|
193
|
+
pendingContextId: snapshot.activatingContextId,
|
|
194
|
+
isLoading: snapshot.activatingContextId !== null,
|
|
195
|
+
onSelectContext: context => void selectContext(context),
|
|
196
|
+
onUseAnother: () => {
|
|
197
|
+
setIdentifier('');
|
|
198
|
+
setShowForm(true);
|
|
199
|
+
}
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
const shownError = rateLimitSeconds > 0 ? t('signin.errors.rateLimited', {
|
|
203
|
+
seconds: rateLimitSeconds
|
|
204
|
+
}) : error;
|
|
205
|
+
const adding = host === 'dialog' && snapshot.hasSession;
|
|
206
|
+
const title = adding ? t('signin.addAccountTitle') : t('signin.title');
|
|
207
|
+
const description = adding ? t('signin.addAccountSubtitle') : appName ? t('signin.subtitleToApp', {
|
|
208
|
+
app: appName
|
|
209
|
+
}) : t('signin.subtitle');
|
|
210
|
+
const noAccount = /*#__PURE__*/_jsxs(Text, {
|
|
211
|
+
style: [styles.note, styles.noAccount, {
|
|
212
|
+
color: theme.colors.textSecondary
|
|
213
|
+
}],
|
|
214
|
+
children: [t('signin.noAccount'), ' ', /*#__PURE__*/_jsx(RNText, {
|
|
215
|
+
accessibilityRole: "link",
|
|
216
|
+
onPress: onCreateAccount,
|
|
217
|
+
style: [styles.noAccountLink, {
|
|
218
|
+
color: theme.colors.text
|
|
219
|
+
}],
|
|
220
|
+
testID: "create-account-link",
|
|
221
|
+
children: t('signin.createAccount')
|
|
222
|
+
})]
|
|
223
|
+
});
|
|
224
|
+
// One solid action per screen: the username's Continue when there is one.
|
|
225
|
+
const commonsAppearance = methods.passkey ? 'outline' : 'solid';
|
|
226
|
+
const continueWithOxyButton = /*#__PURE__*/_jsx(Button, {
|
|
227
|
+
appearance: commonsAppearance,
|
|
228
|
+
tone: commonsAppearance === 'solid' ? 'action' : 'neutral',
|
|
229
|
+
size: "lg",
|
|
230
|
+
fullWidth: true,
|
|
231
|
+
onPress: methods.commons === 'window' ? signInOnOxy : continueWithOxy,
|
|
232
|
+
testID: "continue-with-oxy",
|
|
233
|
+
children: t('accountSwitcher.continueWithOxy')
|
|
234
|
+
});
|
|
235
|
+
const form = /*#__PURE__*/_jsxs(OxyAuthScreen, {
|
|
236
|
+
className: splits ? 'md:max-w-none' : undefined,
|
|
237
|
+
children: [/*#__PURE__*/_jsx(OxyAuthScreenHeader, {
|
|
238
|
+
title: title,
|
|
239
|
+
description: description
|
|
240
|
+
}), splits ? /*#__PURE__*/_jsx(CssView, {
|
|
241
|
+
className: "md:hidden",
|
|
242
|
+
children: continueWithOxyButton
|
|
243
|
+
}) : null, methods.commons === 'continue' || methods.commons === 'window' ? continueWithOxyButton : null, methods.commons === 'get-commons' ? /*#__PURE__*/_jsxs(View, {
|
|
244
|
+
style: styles.stack,
|
|
245
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
246
|
+
style: [styles.note, {
|
|
247
|
+
color: theme.colors.textSecondary
|
|
248
|
+
}],
|
|
249
|
+
children: t('accountSwitcher.commonsNotInstalled')
|
|
250
|
+
}), /*#__PURE__*/_jsx(Button, {
|
|
251
|
+
appearance: "solid",
|
|
252
|
+
tone: "action",
|
|
253
|
+
size: "lg",
|
|
254
|
+
fullWidth: true,
|
|
255
|
+
onPress: getCommons,
|
|
256
|
+
testID: "get-commons-button",
|
|
257
|
+
children: t('accountSwitcher.getCommons')
|
|
258
|
+
})]
|
|
259
|
+
}) : null, methods.passkey ? /*#__PURE__*/_jsxs(View, {
|
|
260
|
+
style: styles.stack,
|
|
261
|
+
children: [/*#__PURE__*/_jsxs(View, {
|
|
262
|
+
style: styles.field,
|
|
263
|
+
children: [/*#__PURE__*/_jsx(TextFieldLabel, {
|
|
264
|
+
nativeID: "username-label",
|
|
265
|
+
children: t('signin.username.label')
|
|
266
|
+
}), /*#__PURE__*/_jsx(TextField, {
|
|
267
|
+
invalid: shownError !== null,
|
|
268
|
+
disabled: blocked,
|
|
269
|
+
radius: 999,
|
|
270
|
+
style: styles.input,
|
|
271
|
+
children: /*#__PURE__*/_jsx(TextFieldInput, {
|
|
272
|
+
testID: "username",
|
|
273
|
+
label: t('signin.username.label'),
|
|
274
|
+
value: identifier,
|
|
275
|
+
onValueChange: value => {
|
|
276
|
+
setIdentifier(value);
|
|
277
|
+
if (error) setError(null);
|
|
278
|
+
},
|
|
279
|
+
placeholder: t('signin.username.placeholder'),
|
|
280
|
+
autoComplete: "username",
|
|
281
|
+
autoCapitalize: "none",
|
|
282
|
+
autoCorrect: false,
|
|
283
|
+
autoFocus: Platform.OS === 'web',
|
|
284
|
+
returnKeyType: "go",
|
|
285
|
+
onSubmitEditing: submitUsername,
|
|
286
|
+
"aria-required": true
|
|
287
|
+
})
|
|
288
|
+
}), shownError ? /*#__PURE__*/_jsx(TextFieldHint, {
|
|
289
|
+
invalid: true,
|
|
290
|
+
children: shownError
|
|
291
|
+
}) : null]
|
|
292
|
+
}), noAccount, /*#__PURE__*/_jsx(Button, {
|
|
293
|
+
appearance: "solid",
|
|
294
|
+
tone: "action",
|
|
295
|
+
size: "lg",
|
|
296
|
+
fullWidth: true,
|
|
297
|
+
loading: pending,
|
|
298
|
+
disabled: blocked,
|
|
299
|
+
onPress: submitUsername,
|
|
300
|
+
testID: "username-continue",
|
|
301
|
+
children: t('signin.actions.continue')
|
|
302
|
+
})]
|
|
303
|
+
}) : null, methods.commons === 'window' ? null : /*#__PURE__*/_jsx(Divider, {
|
|
304
|
+
children: t('signin.orContinueWith')
|
|
305
|
+
}), methods.passkey ? /*#__PURE__*/_jsx(Button, {
|
|
306
|
+
appearance: "outline",
|
|
307
|
+
tone: "neutral",
|
|
308
|
+
size: "lg",
|
|
309
|
+
fullWidth: true,
|
|
310
|
+
leadingIcon: RiKey2Line,
|
|
311
|
+
disabled: blocked,
|
|
312
|
+
onPress: () => void runPasskey(undefined, t('signin.errors.failed')),
|
|
313
|
+
testID: "passkey-sign-in",
|
|
314
|
+
children: t('signin.methods.passkey')
|
|
315
|
+
}) : methods.commons === 'window' ? null : /*#__PURE__*/_jsx(Button, {
|
|
316
|
+
appearance: "outline",
|
|
317
|
+
tone: "neutral",
|
|
318
|
+
size: "lg",
|
|
319
|
+
fullWidth: true,
|
|
320
|
+
leadingIcon: RiQrCodeLine,
|
|
321
|
+
onPress: useAnotherDevice,
|
|
322
|
+
testID: "scan-qr",
|
|
323
|
+
children: t('accountSwitcher.scanQr')
|
|
324
|
+
}), methods.passkey ? null : noAccount, onRecover ? /*#__PURE__*/_jsx(SubtleLink, {
|
|
325
|
+
label: t('signin.recoverLink'),
|
|
326
|
+
theme: theme,
|
|
327
|
+
onPress: onRecover,
|
|
328
|
+
testID: "recover-link"
|
|
329
|
+
}) : null, /*#__PURE__*/_jsx(OxyAuthTerms, {})]
|
|
330
|
+
});
|
|
331
|
+
if (!splits) return form;
|
|
332
|
+
return /*#__PURE__*/_jsx(OxyAuthSplit, {
|
|
333
|
+
aside: /*#__PURE__*/_jsxs(_Fragment, {
|
|
334
|
+
children: [/*#__PURE__*/_jsx(AuthMediaCarousel, {
|
|
335
|
+
slides: SIGN_IN_SLIDES,
|
|
336
|
+
style: StyleSheet.absoluteFill
|
|
337
|
+
}), /*#__PURE__*/_jsx(InlineCommonsQr, {
|
|
338
|
+
controller: controller
|
|
339
|
+
})]
|
|
340
|
+
}),
|
|
341
|
+
children: form
|
|
342
|
+
});
|
|
343
|
+
};
|
|
344
|
+
const styles = StyleSheet.create({
|
|
345
|
+
stack: {
|
|
346
|
+
gap: 12
|
|
347
|
+
},
|
|
348
|
+
field: {
|
|
349
|
+
gap: 6
|
|
350
|
+
},
|
|
351
|
+
note: {
|
|
352
|
+
fontSize: 14,
|
|
353
|
+
lineHeight: 20,
|
|
354
|
+
textAlign: 'center'
|
|
355
|
+
},
|
|
356
|
+
noAccount: {
|
|
357
|
+
textAlign: 'left'
|
|
358
|
+
},
|
|
359
|
+
noAccountLink: {
|
|
360
|
+
textDecorationLine: 'underline'
|
|
361
|
+
},
|
|
362
|
+
input: {
|
|
363
|
+
height: 40
|
|
364
|
+
}
|
|
365
|
+
});
|
|
366
|
+
//# sourceMappingURL=OxySignInPanel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useCallback","useEffect","useState","Linking","Platform","Text","RNText","StyleSheet","View","CssView","AuthMediaCarousel","Button","Divider","RiKey2Line","RiQrCodeLine","useTheme","TextField","TextFieldHint","TextFieldInput","TextFieldLabel","toast","useQueryClient","useOxy","useAccountDialogSnapshot","useDeviceSwitcher","useI18n","getCommonsAcquisitionUrl","isWebBrowser","SubtleLink","SIGN_IN_SLIDES","InlineCommonsQr","OxyAccountPicker","OxyAuthScreen","OxyAuthScreenHeader","OxyAuthSplit","OxyAuthTerms","RATE_LIMIT_SECONDS","describePasskeyError","isRateLimited","resolveSignInMethods","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","OxySignInPanel","onSignedIn","onCreateAccount","onRecover","loginHint","appName","host","theme","t","queryClient","accountDialogController","controller","openAccountDialog","signInWithPasskey","continueOnAuth","snapshot","principals","activeContext","methods","web","commonsAvailability","showForm","setShowForm","Boolean","identifier","setIdentifier","pending","setPending","error","setError","rateLimitSeconds","setRateLimitSeconds","blocked","timer","setTimeout","seconds","Math","max","clearTimeout","mountedAttempt","signIn","attempt","completedHere","phase","showRequest","continueWithOxy","signInWithOxy","signInOnOxy","then","result","status","useAnotherDevice","showQr","getCommons","Promise","resolve","openURL","OS","catch","runPasskey","username","failToast","err","message","description","submitUsername","trim","pickerAllowed","hasSession","reauthenticate","context","handle","selectContext","outcome","chooseContext","contextId","invalidateQueries","passkey","showsPicker","length","splits","commons","signedOut","pendingContextId","activatingContextId","isLoading","onSelectContext","onUseAnother","shownError","adding","title","app","noAccount","style","styles","note","color","colors","textSecondary","children","accessibilityRole","onPress","noAccountLink","text","testID","commonsAppearance","continueWithOxyButton","appearance","tone","size","fullWidth","form","className","undefined","stack","field","nativeID","invalid","disabled","radius","input","label","value","onValueChange","placeholder","autoComplete","autoCapitalize","autoCorrect","autoFocus","returnKeyType","onSubmitEditing","loading","leadingIcon","aside","slides","absoluteFill","create","gap","fontSize","lineHeight","textAlign","textDecorationLine","height"],"sourceRoot":"../../../../../src","sources":["ui/components/signIn/OxySignInPanel.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,WAAW,EAAEC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AACxD,SAASC,OAAO,EAAEC,QAAQ,EAAEC,IAAI,IAAIC,MAAM,EAAEC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAClF,SAASA,IAAI,IAAIC,OAAO,QAAQ,6BAA6B;AAC7D,SAASC,iBAAiB,QAAQ,yBAAyB;AAC3D,SAASC,MAAM,QAAQ,sBAAsB;AAC7C,SAASC,OAAO,QAAQ,uBAAuB;AAC/C,SAASC,UAAU,QAAQ,gCAAgC;AAC3D,SAASC,YAAY,QAAQ,kCAAkC;AAC/D,SAASC,QAAQ,QAAQ,qBAAqB;AAC9C,SAASC,SAAS,EAAEC,aAAa,EAAEC,cAAc,EAAEC,cAAc,QAAQ,0BAA0B;AACnG,SAASC,KAAK,QAAQ,qBAAqB;AAC3C,SAASf,IAAI,QAAQ,0BAA0B;AAE/C,SAASgB,cAAc,QAAQ,uBAAuB;AACtD,SAASC,MAAM,QAAQ,6BAA0B;AACjD,SAASC,wBAAwB,QAAQ,sCAAmC;AAC5E,SAASC,iBAAiB,QAAQ,kCAA+B;AACjE,SAASC,OAAO,QAAQ,wBAAqB;AAC7C,SAASC,wBAAwB,QAAQ,kCAA+B;AACxE,SAASC,YAAY,QAAQ,6BAA0B;AACvD,SAASC,UAAU,QAAQ,8BAA2B;AACtD,SAASC,cAAc,QAAQ,cAAW;AAC1C,SAASC,eAAe,QAAQ,sBAAmB;AACnD,SAASC,gBAAgB,QAAQ,uBAAoB;AACrD,SAASC,aAAa,EAAEC,mBAAmB,EAAEC,YAAY,EAAEC,YAAY,QAAQ,oBA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C;IAAA,CAC3C,CACH;IAAAwF,QAAA,EAEAY;EAAI,CACO,CAAC;AAEnB,CAAC;AAED,MAAMjB,MAAM,GAAGrI,UAAU,CAAC+K,MAAM,CAAC;EAC/BtB,KAAK,EAAE;IACLuB,GAAG,EAAE;EACP,CAAC;EACDtB,KAAK,EAAE;IACLsB,GAAG,EAAE;EACP,CAAC;EACD1C,IAAI,EAAE;IACJ2C,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,EAAE;IACdC,SAAS,EAAE;EACb,CAAC;EACDhD,SAAS,EAAE;IACTgD,SAAS,EAAE;EACb,CAAC;EACDtC,aAAa,EAAE;IACbuC,kBAAkB,EAAE;EACtB,CAAC;EACDrB,KAAK,EAAE;IACLsB,MAAM,EAAE;EACV;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Account creation in the account dialog.
|
|
5
|
+
*
|
|
6
|
+
* On the web the account is made on auth.oxy.so, in its window over the app
|
|
7
|
+
* (`onCreateOnWeb`), and this app is signed in as it. On native, Commons
|
|
8
|
+
* creates the identity: straight in when it is installed, "Get Commons"
|
|
9
|
+
* otherwise.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import { useCallback } from 'react';
|
|
13
|
+
import { Linking, Platform } from 'react-native';
|
|
14
|
+
import { Button } from '@oxy.so/bloom/button';
|
|
15
|
+
import { RiKey2Line } from '@oxy.so/bloom/icons/RiKey2Line';
|
|
16
|
+
import { useTheme } from '@oxy.so/bloom/theme';
|
|
17
|
+
import { toast } from '@oxy.so/bloom/toast';
|
|
18
|
+
import { useOxy } from "../../context/OxyContext.js";
|
|
19
|
+
import { useAccountDialogSnapshot } from "../../hooks/accountDialogSnapshot.js";
|
|
20
|
+
import { useI18n } from "../../hooks/useI18n.js";
|
|
21
|
+
import { getCommonsAcquisitionUrl } from "../../utils/commonsStoreLinks.js";
|
|
22
|
+
import { isWebBrowser } from "../../utils/isWebBrowser.js";
|
|
23
|
+
import { SubtleLink } from "../authChooser/primitives.js";
|
|
24
|
+
import { OxyAuthScreen, OxyAuthScreenHeader, OxyAuthTerms } from "./OxyAuthScreen.js";
|
|
25
|
+
|
|
26
|
+
/** Commons' own identity-creation deep link. */
|
|
27
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
28
|
+
const COMMONS_CREATE_IDENTITY_URL = 'oxycommons://create-identity';
|
|
29
|
+
export const OxySignUpPanel = ({
|
|
30
|
+
onSignIn,
|
|
31
|
+
onCreateOnWeb
|
|
32
|
+
}) => {
|
|
33
|
+
const theme = useTheme();
|
|
34
|
+
const {
|
|
35
|
+
t
|
|
36
|
+
} = useI18n();
|
|
37
|
+
const {
|
|
38
|
+
accountDialogController: controller
|
|
39
|
+
} = useOxy();
|
|
40
|
+
const snapshot = useAccountDialogSnapshot(controller);
|
|
41
|
+
const web = isWebBrowser();
|
|
42
|
+
const openExternal = useCallback(url => {
|
|
43
|
+
Promise.resolve().then(() => Linking.openURL(url)).catch(() => toast.error(t('accountSwitcher.linkOpenFailed')));
|
|
44
|
+
}, [t]);
|
|
45
|
+
const commonsInstalled = snapshot.commonsAvailability === 'available';
|
|
46
|
+
return /*#__PURE__*/_jsxs(OxyAuthScreen, {
|
|
47
|
+
children: [/*#__PURE__*/_jsx(OxyAuthScreenHeader, {
|
|
48
|
+
title: t('signup.title'),
|
|
49
|
+
description: web ? t('signup.webSubtitle') : t('signup.subtitle')
|
|
50
|
+
}), web ? /*#__PURE__*/_jsx(Button, {
|
|
51
|
+
appearance: "solid",
|
|
52
|
+
tone: "action",
|
|
53
|
+
size: "lg",
|
|
54
|
+
fullWidth: true,
|
|
55
|
+
leadingIcon: RiKey2Line,
|
|
56
|
+
onPress: onCreateOnWeb,
|
|
57
|
+
testID: "signup-open-identity",
|
|
58
|
+
children: t('signup.createAccount')
|
|
59
|
+
}) : /*#__PURE__*/_jsx(Button, {
|
|
60
|
+
appearance: "solid",
|
|
61
|
+
tone: "action",
|
|
62
|
+
size: "lg",
|
|
63
|
+
fullWidth: true,
|
|
64
|
+
onPress: () => openExternal(commonsInstalled ? COMMONS_CREATE_IDENTITY_URL : getCommonsAcquisitionUrl(Platform.OS)),
|
|
65
|
+
testID: "signup-commons",
|
|
66
|
+
children: commonsInstalled ? t('signup.createInCommons') : t('accountSwitcher.getCommons')
|
|
67
|
+
}), /*#__PURE__*/_jsx(SubtleLink, {
|
|
68
|
+
label: t('signup.backToSignInLink'),
|
|
69
|
+
theme: theme,
|
|
70
|
+
onPress: onSignIn,
|
|
71
|
+
testID: "back-to-sign-in"
|
|
72
|
+
}), /*#__PURE__*/_jsx(OxyAuthTerms, {})]
|
|
73
|
+
});
|
|
74
|
+
};
|
|
75
|
+
//# sourceMappingURL=OxySignUpPanel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useCallback","Linking","Platform","Button","RiKey2Line","useTheme","toast","useOxy","useAccountDialogSnapshot","useI18n","getCommonsAcquisitionUrl","isWebBrowser","SubtleLink","OxyAuthScreen","OxyAuthScreenHeader","OxyAuthTerms","jsx","_jsx","jsxs","_jsxs","COMMONS_CREATE_IDENTITY_URL","OxySignUpPanel","onSignIn","onCreateOnWeb","theme","t","accountDialogController","controller","snapshot","web","openExternal","url","Promise","resolve","then","openURL","catch","error","commonsInstalled","commonsAvailability","children","title","description","appearance","tone","size","fullWidth","leadingIcon","onPress","testID","OS","label"],"sourceRoot":"../../../../../src","sources":["ui/components/signIn/OxySignUpPanel.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,WAAW,QAAQ,OAAO;AACnC,SAASC,OAAO,EAAEC,QAAQ,QAAQ,cAAc;AAChD,SAASC,MAAM,QAAQ,sBAAsB;AAC7C,SAASC,UAAU,QAAQ,gCAAgC;AAC3D,SAASC,QAAQ,QAAQ,qBAAqB;AAC9C,SAASC,KAAK,QAA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