@entropy-softworks/ui 2026.7.31
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/CHANGELOG.md +96 -0
- package/LICENSE +21 -0
- package/README.md +115 -0
- package/lib/components/auth/LockOverlay.d.ts +22 -0
- package/lib/components/auth/LockOverlay.d.ts.map +1 -0
- package/lib/components/auth/LockOverlay.jsx +82 -0
- package/lib/components/auth/LockOverlay.jsx.map +1 -0
- package/lib/components/auth/PasswordStrengthMeter.d.ts +12 -0
- package/lib/components/auth/PasswordStrengthMeter.d.ts.map +1 -0
- package/lib/components/auth/PasswordStrengthMeter.jsx +81 -0
- package/lib/components/auth/PasswordStrengthMeter.jsx.map +1 -0
- package/lib/components/auth/ProtectedRoute.d.ts +24 -0
- package/lib/components/auth/ProtectedRoute.d.ts.map +1 -0
- package/lib/components/auth/ProtectedRoute.jsx +56 -0
- package/lib/components/auth/ProtectedRoute.jsx.map +1 -0
- package/lib/components/auth/PwnedPasswordWarning.d.ts +13 -0
- package/lib/components/auth/PwnedPasswordWarning.d.ts.map +1 -0
- package/lib/components/auth/PwnedPasswordWarning.jsx +29 -0
- package/lib/components/auth/PwnedPasswordWarning.jsx.map +1 -0
- package/lib/components/auth/index.d.ts +5 -0
- package/lib/components/auth/index.d.ts.map +1 -0
- package/lib/components/auth/index.js +5 -0
- package/lib/components/auth/index.js.map +1 -0
- package/lib/components/bottom-nav.d.ts +25 -0
- package/lib/components/bottom-nav.d.ts.map +1 -0
- package/lib/components/bottom-nav.jsx +51 -0
- package/lib/components/bottom-nav.jsx.map +1 -0
- package/lib/components/button.d.ts +16 -0
- package/lib/components/button.d.ts.map +1 -0
- package/lib/components/button.jsx +73 -0
- package/lib/components/button.jsx.map +1 -0
- package/lib/components/card.d.ts +22 -0
- package/lib/components/card.d.ts.map +1 -0
- package/lib/components/card.jsx +36 -0
- package/lib/components/card.jsx.map +1 -0
- package/lib/components/checkbox.d.ts +12 -0
- package/lib/components/checkbox.d.ts.map +1 -0
- package/lib/components/checkbox.jsx +16 -0
- package/lib/components/checkbox.jsx.map +1 -0
- package/lib/components/connection-settings.d.ts +41 -0
- package/lib/components/connection-settings.d.ts.map +1 -0
- package/lib/components/connection-settings.jsx +354 -0
- package/lib/components/connection-settings.jsx.map +1 -0
- package/lib/components/context-menu.d.ts +52 -0
- package/lib/components/context-menu.d.ts.map +1 -0
- package/lib/components/context-menu.jsx +24 -0
- package/lib/components/context-menu.jsx.map +1 -0
- package/lib/components/data-table.d.ts +59 -0
- package/lib/components/data-table.d.ts.map +1 -0
- package/lib/components/data-table.jsx +101 -0
- package/lib/components/data-table.jsx.map +1 -0
- package/lib/components/dialog.d.ts +58 -0
- package/lib/components/dialog.d.ts.map +1 -0
- package/lib/components/dialog.jsx +197 -0
- package/lib/components/dialog.jsx.map +1 -0
- package/lib/components/dropdown-menu.d.ts +55 -0
- package/lib/components/dropdown-menu.d.ts.map +1 -0
- package/lib/components/dropdown-menu.jsx +38 -0
- package/lib/components/dropdown-menu.jsx.map +1 -0
- package/lib/components/entropy-boot-splash.d.ts +24 -0
- package/lib/components/entropy-boot-splash.d.ts.map +1 -0
- package/lib/components/entropy-boot-splash.jsx +83 -0
- package/lib/components/entropy-boot-splash.jsx.map +1 -0
- package/lib/components/entropy-mark-animated.d.ts +20 -0
- package/lib/components/entropy-mark-animated.d.ts.map +1 -0
- package/lib/components/entropy-mark-animated.jsx +148 -0
- package/lib/components/entropy-mark-animated.jsx.map +1 -0
- package/lib/components/entropy-mark-geometry.d.ts +8 -0
- package/lib/components/entropy-mark-geometry.d.ts.map +1 -0
- package/lib/components/entropy-mark-geometry.js +10 -0
- package/lib/components/entropy-mark-geometry.js.map +1 -0
- package/lib/components/entropy-mark-sequential.d.ts +12 -0
- package/lib/components/entropy-mark-sequential.d.ts.map +1 -0
- package/lib/components/entropy-mark-sequential.jsx +53 -0
- package/lib/components/entropy-mark-sequential.jsx.map +1 -0
- package/lib/components/entropy-mark.d.ts +29 -0
- package/lib/components/entropy-mark.d.ts.map +1 -0
- package/lib/components/entropy-mark.jsx +66 -0
- package/lib/components/entropy-mark.jsx.map +1 -0
- package/lib/components/error-boundary.d.ts +31 -0
- package/lib/components/error-boundary.d.ts.map +1 -0
- package/lib/components/error-boundary.jsx +40 -0
- package/lib/components/error-boundary.jsx.map +1 -0
- package/lib/components/index.d.ts +41 -0
- package/lib/components/index.d.ts.map +1 -0
- package/lib/components/index.js +43 -0
- package/lib/components/index.js.map +1 -0
- package/lib/components/input.d.ts +26 -0
- package/lib/components/input.d.ts.map +1 -0
- package/lib/components/input.jsx +95 -0
- package/lib/components/input.jsx.map +1 -0
- package/lib/components/item-icon.d.ts +32 -0
- package/lib/components/item-icon.d.ts.map +1 -0
- package/lib/components/item-icon.jsx +54 -0
- package/lib/components/item-icon.jsx.map +1 -0
- package/lib/components/label.d.ts +13 -0
- package/lib/components/label.d.ts.map +1 -0
- package/lib/components/label.jsx +9 -0
- package/lib/components/label.jsx.map +1 -0
- package/lib/components/legal-dialog.d.ts +18 -0
- package/lib/components/legal-dialog.d.ts.map +1 -0
- package/lib/components/legal-dialog.jsx +31 -0
- package/lib/components/legal-dialog.jsx.map +1 -0
- package/lib/components/license-gate.d.ts +17 -0
- package/lib/components/license-gate.d.ts.map +1 -0
- package/lib/components/license-gate.jsx +21 -0
- package/lib/components/license-gate.jsx.map +1 -0
- package/lib/components/logo.d.ts +15 -0
- package/lib/components/logo.d.ts.map +1 -0
- package/lib/components/logo.jsx +20 -0
- package/lib/components/logo.jsx.map +1 -0
- package/lib/components/onboarding-wizard.d.ts +89 -0
- package/lib/components/onboarding-wizard.d.ts.map +1 -0
- package/lib/components/onboarding-wizard.jsx +185 -0
- package/lib/components/onboarding-wizard.jsx.map +1 -0
- package/lib/components/pagination.d.ts +43 -0
- package/lib/components/pagination.d.ts.map +1 -0
- package/lib/components/pagination.jsx +72 -0
- package/lib/components/pagination.jsx.map +1 -0
- package/lib/components/password-generator.d.ts +15 -0
- package/lib/components/password-generator.d.ts.map +1 -0
- package/lib/components/password-generator.jsx +273 -0
- package/lib/components/password-generator.jsx.map +1 -0
- package/lib/components/pin-pad.d.ts +20 -0
- package/lib/components/pin-pad.d.ts.map +1 -0
- package/lib/components/pin-pad.jsx +93 -0
- package/lib/components/pin-pad.jsx.map +1 -0
- package/lib/components/popover.d.ts +27 -0
- package/lib/components/popover.d.ts.map +1 -0
- package/lib/components/popover.jsx +18 -0
- package/lib/components/popover.jsx.map +1 -0
- package/lib/components/profile/ProfileDialog.d.ts +25 -0
- package/lib/components/profile/ProfileDialog.d.ts.map +1 -0
- package/lib/components/profile/ProfileDialog.jsx +71 -0
- package/lib/components/profile/ProfileDialog.jsx.map +1 -0
- package/lib/components/profile/ProfileTab.d.ts +12 -0
- package/lib/components/profile/ProfileTab.d.ts.map +1 -0
- package/lib/components/profile/ProfileTab.jsx +112 -0
- package/lib/components/profile/ProfileTab.jsx.map +1 -0
- package/lib/components/profile/SecurityTab.d.ts +32 -0
- package/lib/components/profile/SecurityTab.d.ts.map +1 -0
- package/lib/components/profile/SecurityTab.jsx +145 -0
- package/lib/components/profile/SecurityTab.jsx.map +1 -0
- package/lib/components/profile/index.d.ts +4 -0
- package/lib/components/profile/index.d.ts.map +1 -0
- package/lib/components/profile/index.js +4 -0
- package/lib/components/profile/index.js.map +1 -0
- package/lib/components/segmented-toggle.d.ts +28 -0
- package/lib/components/segmented-toggle.d.ts.map +1 -0
- package/lib/components/segmented-toggle.jsx +64 -0
- package/lib/components/segmented-toggle.jsx.map +1 -0
- package/lib/components/separator.d.ts +13 -0
- package/lib/components/separator.d.ts.map +1 -0
- package/lib/components/separator.jsx +16 -0
- package/lib/components/separator.jsx.map +1 -0
- package/lib/components/server-settings.d.ts +27 -0
- package/lib/components/server-settings.d.ts.map +1 -0
- package/lib/components/server-settings.jsx +307 -0
- package/lib/components/server-settings.jsx.map +1 -0
- package/lib/components/settings/AccountSection.d.ts +26 -0
- package/lib/components/settings/AccountSection.d.ts.map +1 -0
- package/lib/components/settings/AccountSection.jsx +32 -0
- package/lib/components/settings/AccountSection.jsx.map +1 -0
- package/lib/components/settings/DangerZoneSection.d.ts +13 -0
- package/lib/components/settings/DangerZoneSection.d.ts.map +1 -0
- package/lib/components/settings/DangerZoneSection.jsx +16 -0
- package/lib/components/settings/DangerZoneSection.jsx.map +1 -0
- package/lib/components/settings/GeneralSection.d.ts +11 -0
- package/lib/components/settings/GeneralSection.d.ts.map +1 -0
- package/lib/components/settings/GeneralSection.jsx +12 -0
- package/lib/components/settings/GeneralSection.jsx.map +1 -0
- package/lib/components/settings/SupportSection.d.ts +11 -0
- package/lib/components/settings/SupportSection.d.ts.map +1 -0
- package/lib/components/settings/SupportSection.jsx +22 -0
- package/lib/components/settings/SupportSection.jsx.map +1 -0
- package/lib/components/settings/index.d.ts +5 -0
- package/lib/components/settings/index.d.ts.map +1 -0
- package/lib/components/settings/index.js +5 -0
- package/lib/components/settings/index.js.map +1 -0
- package/lib/components/settings-row.d.ts +28 -0
- package/lib/components/settings-row.d.ts.map +1 -0
- package/lib/components/settings-row.jsx +68 -0
- package/lib/components/settings-row.jsx.map +1 -0
- package/lib/components/skeleton.d.ts +8 -0
- package/lib/components/skeleton.d.ts.map +1 -0
- package/lib/components/skeleton.jsx +24 -0
- package/lib/components/skeleton.jsx.map +1 -0
- package/lib/components/social-connections.d.ts +15 -0
- package/lib/components/social-connections.d.ts.map +1 -0
- package/lib/components/social-connections.jsx +31 -0
- package/lib/components/social-connections.jsx.map +1 -0
- package/lib/components/stat-card.d.ts +29 -0
- package/lib/components/stat-card.d.ts.map +1 -0
- package/lib/components/stat-card.jsx +36 -0
- package/lib/components/stat-card.jsx.map +1 -0
- package/lib/components/tag-chip.d.ts +18 -0
- package/lib/components/tag-chip.d.ts.map +1 -0
- package/lib/components/tag-chip.jsx +54 -0
- package/lib/components/tag-chip.jsx.map +1 -0
- package/lib/components/tag-multi-select.d.ts +27 -0
- package/lib/components/tag-multi-select.d.ts.map +1 -0
- package/lib/components/tag-multi-select.jsx +65 -0
- package/lib/components/tag-multi-select.jsx.map +1 -0
- package/lib/components/text.d.ts +22 -0
- package/lib/components/text.d.ts.map +1 -0
- package/lib/components/text.jsx +43 -0
- package/lib/components/text.jsx.map +1 -0
- package/lib/components/toast/ToastPortal.d.ts +11 -0
- package/lib/components/toast/ToastPortal.d.ts.map +1 -0
- package/lib/components/toast/ToastPortal.jsx +15 -0
- package/lib/components/toast/ToastPortal.jsx.map +1 -0
- package/lib/components/toast/ToastPortal.web.d.ts +14 -0
- package/lib/components/toast/ToastPortal.web.d.ts.map +1 -0
- package/lib/components/toast/ToastPortal.web.jsx +39 -0
- package/lib/components/toast/ToastPortal.web.jsx.map +1 -0
- package/lib/components/toast/index.d.ts +3 -0
- package/lib/components/toast/index.d.ts.map +1 -0
- package/lib/components/toast/index.js +3 -0
- package/lib/components/toast/index.js.map +1 -0
- package/lib/components/toast/toast-config.d.ts +14 -0
- package/lib/components/toast/toast-config.d.ts.map +1 -0
- package/lib/components/toast/toast-config.jsx +24 -0
- package/lib/components/toast/toast-config.jsx.map +1 -0
- package/lib/components/tooltip.d.ts +30 -0
- package/lib/components/tooltip.d.ts.map +1 -0
- package/lib/components/tooltip.jsx +14 -0
- package/lib/components/tooltip.jsx.map +1 -0
- package/lib/components/totp-display.d.ts +23 -0
- package/lib/components/totp-display.d.ts.map +1 -0
- package/lib/components/totp-display.jsx +132 -0
- package/lib/components/totp-display.jsx.map +1 -0
- package/lib/components/user-avatar.d.ts +18 -0
- package/lib/components/user-avatar.d.ts.map +1 -0
- package/lib/components/user-avatar.jsx +25 -0
- package/lib/components/user-avatar.jsx.map +1 -0
- package/lib/context/AppConfigContext.d.ts +56 -0
- package/lib/context/AppConfigContext.d.ts.map +1 -0
- package/lib/context/AppConfigContext.jsx +14 -0
- package/lib/context/AppConfigContext.jsx.map +1 -0
- package/lib/context/NavigationContext.d.ts +42 -0
- package/lib/context/NavigationContext.d.ts.map +1 -0
- package/lib/context/NavigationContext.jsx +53 -0
- package/lib/context/NavigationContext.jsx.map +1 -0
- package/lib/context/NotificationContext.d.ts +32 -0
- package/lib/context/NotificationContext.d.ts.map +1 -0
- package/lib/context/NotificationContext.jsx +49 -0
- package/lib/context/NotificationContext.jsx.map +1 -0
- package/lib/context/ThemeContext.d.ts +12 -0
- package/lib/context/ThemeContext.d.ts.map +1 -0
- package/lib/context/ThemeContext.jsx +66 -0
- package/lib/context/ThemeContext.jsx.map +1 -0
- package/lib/context/index.d.ts +5 -0
- package/lib/context/index.d.ts.map +1 -0
- package/lib/context/index.js +5 -0
- package/lib/context/index.js.map +1 -0
- package/lib/flags.d.ts +9 -0
- package/lib/flags.d.ts.map +1 -0
- package/lib/flags.js +37 -0
- package/lib/flags.js.map +1 -0
- package/lib/forms/form-error.d.ts +12 -0
- package/lib/forms/form-error.d.ts.map +1 -0
- package/lib/forms/form-error.jsx +14 -0
- package/lib/forms/form-error.jsx.map +1 -0
- package/lib/forms/index.d.ts +3 -0
- package/lib/forms/index.d.ts.map +1 -0
- package/lib/forms/index.js +3 -0
- package/lib/forms/index.js.map +1 -0
- package/lib/forms/shake-field.d.ts +18 -0
- package/lib/forms/shake-field.d.ts.map +1 -0
- package/lib/forms/shake-field.jsx +30 -0
- package/lib/forms/shake-field.jsx.map +1 -0
- package/lib/hooks/index.d.ts +6 -0
- package/lib/hooks/index.d.ts.map +1 -0
- package/lib/hooks/index.js +6 -0
- package/lib/hooks/index.js.map +1 -0
- package/lib/hooks/useAuth.d.ts +109 -0
- package/lib/hooks/useAuth.d.ts.map +1 -0
- package/lib/hooks/useAuth.jsx +404 -0
- package/lib/hooks/useAuth.jsx.map +1 -0
- package/lib/hooks/useAutoLock.d.ts +22 -0
- package/lib/hooks/useAutoLock.d.ts.map +1 -0
- package/lib/hooks/useAutoLock.js +85 -0
- package/lib/hooks/useAutoLock.js.map +1 -0
- package/lib/hooks/useDebouncedValue.d.ts +19 -0
- package/lib/hooks/useDebouncedValue.d.ts.map +1 -0
- package/lib/hooks/useDebouncedValue.js +29 -0
- package/lib/hooks/useDebouncedValue.js.map +1 -0
- package/lib/hooks/useShakeAnimation.d.ts +17 -0
- package/lib/hooks/useShakeAnimation.d.ts.map +1 -0
- package/lib/hooks/useShakeAnimation.js +22 -0
- package/lib/hooks/useShakeAnimation.js.map +1 -0
- package/lib/hooks/useUploadBlobUrl.d.ts +13 -0
- package/lib/hooks/useUploadBlobUrl.d.ts.map +1 -0
- package/lib/hooks/useUploadBlobUrl.js +60 -0
- package/lib/hooks/useUploadBlobUrl.js.map +1 -0
- package/lib/index.d.ts +10 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +47 -0
- package/lib/index.js.map +1 -0
- package/lib/screens/auth/AccountPickerScreen.d.ts +24 -0
- package/lib/screens/auth/AccountPickerScreen.d.ts.map +1 -0
- package/lib/screens/auth/AccountPickerScreen.jsx +47 -0
- package/lib/screens/auth/AccountPickerScreen.jsx.map +1 -0
- package/lib/screens/auth/AuthScreen.d.ts +59 -0
- package/lib/screens/auth/AuthScreen.d.ts.map +1 -0
- package/lib/screens/auth/AuthScreen.jsx +594 -0
- package/lib/screens/auth/AuthScreen.jsx.map +1 -0
- package/lib/screens/auth/ConsentScreen.d.ts +27 -0
- package/lib/screens/auth/ConsentScreen.d.ts.map +1 -0
- package/lib/screens/auth/ConsentScreen.jsx +55 -0
- package/lib/screens/auth/ConsentScreen.jsx.map +1 -0
- package/lib/screens/auth/ErrorScreen.d.ts +20 -0
- package/lib/screens/auth/ErrorScreen.d.ts.map +1 -0
- package/lib/screens/auth/ErrorScreen.jsx +43 -0
- package/lib/screens/auth/ErrorScreen.jsx.map +1 -0
- package/lib/screens/auth/ExpiredLinkScreen.d.ts +19 -0
- package/lib/screens/auth/ExpiredLinkScreen.d.ts.map +1 -0
- package/lib/screens/auth/ExpiredLinkScreen.jsx +38 -0
- package/lib/screens/auth/ExpiredLinkScreen.jsx.map +1 -0
- package/lib/screens/auth/ForgotPasswordScreen.d.ts +4 -0
- package/lib/screens/auth/ForgotPasswordScreen.d.ts.map +1 -0
- package/lib/screens/auth/ForgotPasswordScreen.jsx +123 -0
- package/lib/screens/auth/ForgotPasswordScreen.jsx.map +1 -0
- package/lib/screens/auth/ImportDataScreen.d.ts +17 -0
- package/lib/screens/auth/ImportDataScreen.d.ts.map +1 -0
- package/lib/screens/auth/ImportDataScreen.jsx +73 -0
- package/lib/screens/auth/ImportDataScreen.jsx.map +1 -0
- package/lib/screens/auth/LoginScreen.d.ts +38 -0
- package/lib/screens/auth/LoginScreen.d.ts.map +1 -0
- package/lib/screens/auth/LoginScreen.jsx +326 -0
- package/lib/screens/auth/LoginScreen.jsx.map +1 -0
- package/lib/screens/auth/MfaChallengeScreen.d.ts +4 -0
- package/lib/screens/auth/MfaChallengeScreen.d.ts.map +1 -0
- package/lib/screens/auth/MfaChallengeScreen.jsx +139 -0
- package/lib/screens/auth/MfaChallengeScreen.jsx.map +1 -0
- package/lib/screens/auth/MfaEnrollScreen.d.ts +12 -0
- package/lib/screens/auth/MfaEnrollScreen.d.ts.map +1 -0
- package/lib/screens/auth/MfaEnrollScreen.jsx +267 -0
- package/lib/screens/auth/MfaEnrollScreen.jsx.map +1 -0
- package/lib/screens/auth/PasskeyEnrollScreen.d.ts +18 -0
- package/lib/screens/auth/PasskeyEnrollScreen.d.ts.map +1 -0
- package/lib/screens/auth/PasskeyEnrollScreen.jsx +51 -0
- package/lib/screens/auth/PasskeyEnrollScreen.jsx.map +1 -0
- package/lib/screens/auth/PrivacyPolicyScreen.d.ts +19 -0
- package/lib/screens/auth/PrivacyPolicyScreen.d.ts.map +1 -0
- package/lib/screens/auth/PrivacyPolicyScreen.jsx +143 -0
- package/lib/screens/auth/PrivacyPolicyScreen.jsx.map +1 -0
- package/lib/screens/auth/RegisterScreen.d.ts +14 -0
- package/lib/screens/auth/RegisterScreen.d.ts.map +1 -0
- package/lib/screens/auth/RegisterScreen.jsx +296 -0
- package/lib/screens/auth/RegisterScreen.jsx.map +1 -0
- package/lib/screens/auth/ResetPasswordScreen.d.ts +12 -0
- package/lib/screens/auth/ResetPasswordScreen.d.ts.map +1 -0
- package/lib/screens/auth/ResetPasswordScreen.jsx +276 -0
- package/lib/screens/auth/ResetPasswordScreen.jsx.map +1 -0
- package/lib/screens/auth/ServerConfigScreen.d.ts +18 -0
- package/lib/screens/auth/ServerConfigScreen.d.ts.map +1 -0
- package/lib/screens/auth/ServerConfigScreen.jsx +259 -0
- package/lib/screens/auth/ServerConfigScreen.jsx.map +1 -0
- package/lib/screens/auth/TermsOfServiceScreen.d.ts +30 -0
- package/lib/screens/auth/TermsOfServiceScreen.d.ts.map +1 -0
- package/lib/screens/auth/TermsOfServiceScreen.jsx +130 -0
- package/lib/screens/auth/TermsOfServiceScreen.jsx.map +1 -0
- package/lib/screens/auth/VerifyEmailScreen.d.ts +4 -0
- package/lib/screens/auth/VerifyEmailScreen.d.ts.map +1 -0
- package/lib/screens/auth/VerifyEmailScreen.jsx +249 -0
- package/lib/screens/auth/VerifyEmailScreen.jsx.map +1 -0
- package/lib/screens/auth/WelcomeScreen.d.ts +17 -0
- package/lib/screens/auth/WelcomeScreen.d.ts.map +1 -0
- package/lib/screens/auth/WelcomeScreen.jsx +58 -0
- package/lib/screens/auth/WelcomeScreen.jsx.map +1 -0
- package/lib/screens/auth/index.d.ts +19 -0
- package/lib/screens/auth/index.d.ts.map +1 -0
- package/lib/screens/auth/index.js +19 -0
- package/lib/screens/auth/index.js.map +1 -0
- package/lib/screens/index.d.ts +2 -0
- package/lib/screens/index.d.ts.map +1 -0
- package/lib/screens/index.js +2 -0
- package/lib/screens/index.js.map +1 -0
- package/lib/services/api-config.d.ts +87 -0
- package/lib/services/api-config.d.ts.map +1 -0
- package/lib/services/api-config.js +202 -0
- package/lib/services/api-config.js.map +1 -0
- package/lib/services/auth.service.d.ts +140 -0
- package/lib/services/auth.service.d.ts.map +1 -0
- package/lib/services/auth.service.js +376 -0
- package/lib/services/auth.service.js.map +1 -0
- package/lib/services/favicon.d.ts +46 -0
- package/lib/services/favicon.d.ts.map +1 -0
- package/lib/services/favicon.js +84 -0
- package/lib/services/favicon.js.map +1 -0
- package/lib/services/hibp-cache.d.ts +23 -0
- package/lib/services/hibp-cache.d.ts.map +1 -0
- package/lib/services/hibp-cache.js +56 -0
- package/lib/services/hibp-cache.js.map +1 -0
- package/lib/services/hibp.d.ts +28 -0
- package/lib/services/hibp.d.ts.map +1 -0
- package/lib/services/hibp.js +92 -0
- package/lib/services/hibp.js.map +1 -0
- package/lib/services/index.d.ts +8 -0
- package/lib/services/index.d.ts.map +1 -0
- package/lib/services/index.js +7 -0
- package/lib/services/index.js.map +1 -0
- package/lib/services/passkey.d.ts +10 -0
- package/lib/services/passkey.d.ts.map +1 -0
- package/lib/services/passkey.js +192 -0
- package/lib/services/passkey.js.map +1 -0
- package/lib/utils/api-fetch.d.ts +11 -0
- package/lib/utils/api-fetch.d.ts.map +1 -0
- package/lib/utils/api-fetch.js +52 -0
- package/lib/utils/api-fetch.js.map +1 -0
- package/lib/utils/clipboard.d.ts +31 -0
- package/lib/utils/clipboard.d.ts.map +1 -0
- package/lib/utils/clipboard.js +66 -0
- package/lib/utils/clipboard.js.map +1 -0
- package/lib/utils/cn.d.ts +9 -0
- package/lib/utils/cn.d.ts.map +1 -0
- package/lib/utils/cn.js +12 -0
- package/lib/utils/cn.js.map +1 -0
- package/lib/utils/debounce.d.ts +13 -0
- package/lib/utils/debounce.d.ts.map +1 -0
- package/lib/utils/debounce.js +28 -0
- package/lib/utils/debounce.js.map +1 -0
- package/lib/utils/error.d.ts +9 -0
- package/lib/utils/error.d.ts.map +1 -0
- package/lib/utils/error.js +11 -0
- package/lib/utils/error.js.map +1 -0
- package/lib/utils/fetch.d.ts +17 -0
- package/lib/utils/fetch.d.ts.map +1 -0
- package/lib/utils/fetch.js +29 -0
- package/lib/utils/fetch.js.map +1 -0
- package/lib/utils/http-error.d.ts +41 -0
- package/lib/utils/http-error.d.ts.map +1 -0
- package/lib/utils/http-error.js +63 -0
- package/lib/utils/http-error.js.map +1 -0
- package/lib/utils/index.d.ts +11 -0
- package/lib/utils/index.d.ts.map +1 -0
- package/lib/utils/index.js +11 -0
- package/lib/utils/index.js.map +1 -0
- package/lib/utils/palette.d.ts +46 -0
- package/lib/utils/palette.d.ts.map +1 -0
- package/lib/utils/palette.js +75 -0
- package/lib/utils/palette.js.map +1 -0
- package/lib/utils/password.d.ts +20 -0
- package/lib/utils/password.d.ts.map +1 -0
- package/lib/utils/password.js +51 -0
- package/lib/utils/password.js.map +1 -0
- package/lib/utils/settings-storage.d.ts +3 -0
- package/lib/utils/settings-storage.d.ts.map +1 -0
- package/lib/utils/settings-storage.js +62 -0
- package/lib/utils/settings-storage.js.map +1 -0
- package/lib/utils/validation.d.ts +29 -0
- package/lib/utils/validation.d.ts.map +1 -0
- package/lib/utils/validation.js +58 -0
- package/lib/utils/validation.js.map +1 -0
- package/package.json +204 -0
- package/src/components/__tests__/data-table.test.ts +94 -0
- package/src/components/__tests__/pagination.test.ts +73 -0
- package/src/components/__tests__/stat-card.test.ts +21 -0
- package/src/components/auth/LockOverlay.tsx +122 -0
- package/src/components/auth/PasswordStrengthMeter.tsx +96 -0
- package/src/components/auth/ProtectedRoute.tsx +91 -0
- package/src/components/auth/PwnedPasswordWarning.tsx +54 -0
- package/src/components/auth/index.ts +10 -0
- package/src/components/bottom-nav.tsx +99 -0
- package/src/components/button.tsx +144 -0
- package/src/components/card.tsx +82 -0
- package/src/components/checkbox.tsx +48 -0
- package/src/components/connection-settings.tsx +583 -0
- package/src/components/context-menu.tsx +95 -0
- package/src/components/data-table.tsx +223 -0
- package/src/components/dialog.tsx +376 -0
- package/src/components/dropdown-menu.tsx +120 -0
- package/src/components/entropy-boot-splash.tsx +114 -0
- package/src/components/entropy-mark-animated.tsx +260 -0
- package/src/components/entropy-mark-geometry.ts +11 -0
- package/src/components/entropy-mark-sequential.tsx +132 -0
- package/src/components/entropy-mark.tsx +135 -0
- package/src/components/error-boundary.tsx +70 -0
- package/src/components/index.ts +156 -0
- package/src/components/input.tsx +246 -0
- package/src/components/item-icon.tsx +111 -0
- package/src/components/label.tsx +25 -0
- package/src/components/legal-dialog.tsx +47 -0
- package/src/components/license-gate.tsx +28 -0
- package/src/components/logo.tsx +34 -0
- package/src/components/onboarding-wizard.tsx +353 -0
- package/src/components/pagination.tsx +154 -0
- package/src/components/password-generator.tsx +393 -0
- package/src/components/pin-pad.tsx +156 -0
- package/src/components/popover.tsx +38 -0
- package/src/components/profile/ProfileDialog.tsx +129 -0
- package/src/components/profile/ProfileTab.tsx +151 -0
- package/src/components/profile/SecurityTab.tsx +229 -0
- package/src/components/profile/index.ts +3 -0
- package/src/components/segmented-toggle.tsx +119 -0
- package/src/components/separator.tsx +41 -0
- package/src/components/server-settings.tsx +442 -0
- package/src/components/settings/AccountSection.tsx +76 -0
- package/src/components/settings/DangerZoneSection.tsx +37 -0
- package/src/components/settings/GeneralSection.tsx +39 -0
- package/src/components/settings/SupportSection.tsx +53 -0
- package/src/components/settings/index.ts +4 -0
- package/src/components/settings-row.tsx +126 -0
- package/src/components/skeleton.tsx +48 -0
- package/src/components/social-connections.tsx +55 -0
- package/src/components/stat-card.tsx +64 -0
- package/src/components/tag-chip.tsx +78 -0
- package/src/components/tag-multi-select.tsx +136 -0
- package/src/components/text.tsx +77 -0
- package/src/components/toast/ToastPortal.tsx +16 -0
- package/src/components/toast/ToastPortal.web.tsx +47 -0
- package/src/components/toast/index.ts +2 -0
- package/src/components/toast/toast-config.tsx +31 -0
- package/src/components/tooltip.tsx +30 -0
- package/src/components/totp-display.tsx +207 -0
- package/src/components/user-avatar.tsx +46 -0
- package/src/context/AppConfigContext.tsx +76 -0
- package/src/context/NavigationContext.tsx +75 -0
- package/src/context/NotificationContext.tsx +69 -0
- package/src/context/ThemeContext.tsx +83 -0
- package/src/context/__tests__/NavigationContext.test.tsx +53 -0
- package/src/context/index.ts +24 -0
- package/src/flags.ts +44 -0
- package/src/forms/form-error.tsx +20 -0
- package/src/forms/index.ts +2 -0
- package/src/forms/shake-field.tsx +52 -0
- package/src/hooks/__tests__/useUploadBlobUrl.test.tsx +77 -0
- package/src/hooks/index.ts +18 -0
- package/src/hooks/useAuth.tsx +567 -0
- package/src/hooks/useAutoLock.ts +110 -0
- package/src/hooks/useDebouncedValue.ts +32 -0
- package/src/hooks/useShakeAnimation.ts +42 -0
- package/src/hooks/useUploadBlobUrl.ts +75 -0
- package/src/index.ts +48 -0
- package/src/screens/auth/AccountPickerScreen.tsx +103 -0
- package/src/screens/auth/AuthScreen.tsx +941 -0
- package/src/screens/auth/ConsentScreen.tsx +118 -0
- package/src/screens/auth/ErrorScreen.tsx +96 -0
- package/src/screens/auth/ExpiredLinkScreen.tsx +87 -0
- package/src/screens/auth/ForgotPasswordScreen.tsx +182 -0
- package/src/screens/auth/ImportDataScreen.tsx +112 -0
- package/src/screens/auth/LoginScreen.tsx +484 -0
- package/src/screens/auth/MfaChallengeScreen.tsx +216 -0
- package/src/screens/auth/MfaEnrollScreen.tsx +388 -0
- package/src/screens/auth/PasskeyEnrollScreen.tsx +96 -0
- package/src/screens/auth/PrivacyPolicyScreen.tsx +249 -0
- package/src/screens/auth/RegisterScreen.tsx +430 -0
- package/src/screens/auth/ResetPasswordScreen.tsx +377 -0
- package/src/screens/auth/ServerConfigScreen.tsx +388 -0
- package/src/screens/auth/TermsOfServiceScreen.tsx +236 -0
- package/src/screens/auth/VerifyEmailScreen.tsx +310 -0
- package/src/screens/auth/WelcomeScreen.tsx +78 -0
- package/src/screens/auth/index.ts +36 -0
- package/src/screens/index.ts +1 -0
- package/src/services/__tests__/api-config.test.ts +67 -0
- package/src/services/__tests__/favicon.test.ts +88 -0
- package/src/services/__tests__/hibp-cache.test.ts +37 -0
- package/src/services/__tests__/hibp.test.ts +39 -0
- package/src/services/api-config.ts +260 -0
- package/src/services/auth.service.ts +498 -0
- package/src/services/favicon.ts +102 -0
- package/src/services/hibp-cache.ts +71 -0
- package/src/services/hibp.ts +120 -0
- package/src/services/index.ts +52 -0
- package/src/services/passkey.ts +213 -0
- package/src/types/external.d.ts +24 -0
- package/src/utils/__tests__/clipboard.test.ts +59 -0
- package/src/utils/__tests__/cn.test.ts +24 -0
- package/src/utils/__tests__/debounce.test.ts +42 -0
- package/src/utils/__tests__/error.test.ts +18 -0
- package/src/utils/__tests__/http-error.test.ts +33 -0
- package/src/utils/__tests__/palette.test.ts +22 -0
- package/src/utils/__tests__/password.test.ts +55 -0
- package/src/utils/__tests__/settings-storage.test.ts +15 -0
- package/src/utils/__tests__/validation.test.ts +52 -0
- package/src/utils/api-fetch.ts +61 -0
- package/src/utils/clipboard.ts +69 -0
- package/src/utils/cn.ts +12 -0
- package/src/utils/debounce.ts +33 -0
- package/src/utils/error.ts +10 -0
- package/src/utils/fetch.ts +33 -0
- package/src/utils/http-error.ts +81 -0
- package/src/utils/index.ts +23 -0
- package/src/utils/palette.ts +105 -0
- package/src/utils/password.ts +64 -0
- package/src/utils/settings-storage.ts +68 -0
- package/src/utils/validation.ts +71 -0
- package/styles/globals.css +262 -0
- package/tailwind-preset.js +163 -0
|
@@ -0,0 +1,326 @@
|
|
|
1
|
+
import React, { useEffect, useRef, useState } from "react";
|
|
2
|
+
import { ScrollView, View } from "react-native";
|
|
3
|
+
import { SafeAreaView } from "react-native-safe-area-context";
|
|
4
|
+
import { useNavigation } from "../../context/NavigationContext";
|
|
5
|
+
import { StatusBar } from "expo-status-bar";
|
|
6
|
+
import { Ionicons } from "@expo/vector-icons";
|
|
7
|
+
import { useColorScheme } from "nativewind";
|
|
8
|
+
import * as Haptics from "expo-haptics";
|
|
9
|
+
import { Heading, MutedText, Text } from "../../components/text";
|
|
10
|
+
import { Button, IconButton } from "../../components/button";
|
|
11
|
+
import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, } from "../../components/card";
|
|
12
|
+
import { EmailInput, PasswordInput } from "../../components/input";
|
|
13
|
+
import { Dialog, DialogButton, DialogFooter } from "../../components/dialog";
|
|
14
|
+
import { SeparatorWithText } from "../../components/separator";
|
|
15
|
+
import { useAuth } from "../../hooks/useAuth";
|
|
16
|
+
import { ApiError } from "../../utils/http-error";
|
|
17
|
+
import { validateEmail } from "../../utils/validation";
|
|
18
|
+
import { useShakeAnimation } from "../../hooks/useShakeAnimation";
|
|
19
|
+
import ShakeField from "../../forms/shake-field";
|
|
20
|
+
import FormError from "../../forms/form-error";
|
|
21
|
+
import { useAppConfig } from "../../context/AppConfigContext";
|
|
22
|
+
const SCROLL_CONTENT_STYLE = { flexGrow: 1 };
|
|
23
|
+
export function LoginScreen({ topAccessory, socialAuth, passwordPlaceholder = "Enter your password", passwordLabel = "Password", passkeyEnabled = false, passkeyUnlockPlaceholder = "Enter your master password", passkeyUnlockTitle = "Unlock your vault", passkeyUnlockDescription = "Signed in successfully. This passkey can't unlock the vault on its own — enter your master password to decrypt your data.", } = {}) {
|
|
24
|
+
const { login: authLogin, loginWithPasskey, unlockWithPassword } = useAuth();
|
|
25
|
+
const router = useNavigation();
|
|
26
|
+
const { appName, Logo, routes } = useAppConfig();
|
|
27
|
+
const [email, setEmail] = useState("");
|
|
28
|
+
const [password, setPassword] = useState("");
|
|
29
|
+
const [isLoading, setIsLoading] = useState(false);
|
|
30
|
+
const [errors, setErrors] = useState({});
|
|
31
|
+
// Passkey ceremony state machine.
|
|
32
|
+
// "idle" — default; primary CTA is the email/password form.
|
|
33
|
+
// "passkey-loading" — passkey ceremony is in flight.
|
|
34
|
+
// "passkey-unlock" — server accepted the assertion but the
|
|
35
|
+
// authenticator did not honor PRF; collect the
|
|
36
|
+
// master password to complete local unlock.
|
|
37
|
+
const [passkeyStep, setPasskeyStep] = useState("idle");
|
|
38
|
+
const [unlockPassword, setUnlockPassword] = useState("");
|
|
39
|
+
const [unlockError, setUnlockError] = useState("");
|
|
40
|
+
const [pendingOnboardingStep, setPendingOnboardingStep] = useState(null);
|
|
41
|
+
// Abort an in-flight passkey ceremony on unmount so the OS prompt
|
|
42
|
+
// tears down and the resolved credential doesn't land on a stale
|
|
43
|
+
// setState. Ref + cleanup so navigating away mid-ceremony is clean.
|
|
44
|
+
const passkeyAbortRef = useRef(null);
|
|
45
|
+
useEffect(() => () => {
|
|
46
|
+
passkeyAbortRef.current?.abort();
|
|
47
|
+
}, []);
|
|
48
|
+
const { colorScheme } = useColorScheme();
|
|
49
|
+
const isDark = colorScheme === "dark";
|
|
50
|
+
const emailShake = useShakeAnimation();
|
|
51
|
+
const passwordShake = useShakeAnimation();
|
|
52
|
+
const firstError = errors.email ?? errors.password;
|
|
53
|
+
const validateForm = () => {
|
|
54
|
+
const newErrors = {};
|
|
55
|
+
if (!email) {
|
|
56
|
+
newErrors.email = "Email is required";
|
|
57
|
+
}
|
|
58
|
+
else if (!validateEmail(email)) {
|
|
59
|
+
newErrors.email = "Please enter a valid email";
|
|
60
|
+
}
|
|
61
|
+
if (!password) {
|
|
62
|
+
newErrors.password = "Password is required";
|
|
63
|
+
}
|
|
64
|
+
else if (password.length < 8) {
|
|
65
|
+
newErrors.password = "Password must be at least 8 characters";
|
|
66
|
+
}
|
|
67
|
+
return newErrors;
|
|
68
|
+
};
|
|
69
|
+
const performLogin = async () => {
|
|
70
|
+
setIsLoading(true);
|
|
71
|
+
try {
|
|
72
|
+
await authLogin(email.trim().toLowerCase(), password);
|
|
73
|
+
setPassword("");
|
|
74
|
+
await Haptics.notificationAsync(Haptics.NotificationFeedbackType.Success);
|
|
75
|
+
}
|
|
76
|
+
catch (error) {
|
|
77
|
+
await Haptics.notificationAsync(Haptics.NotificationFeedbackType.Error);
|
|
78
|
+
const errorMessage = error instanceof Error ? error.message : "Login failed";
|
|
79
|
+
// Prefer the server's machine-readable `error.code` over
|
|
80
|
+
// substring-matching the English message — i18n on the server
|
|
81
|
+
// (or a wording tweak) silently broke the old branches.
|
|
82
|
+
const code = error instanceof ApiError ? error.code : undefined;
|
|
83
|
+
// Codes the server emits today. Unknown / missing codes fall
|
|
84
|
+
// through to the generic "show the server's message" branch.
|
|
85
|
+
if (code === "INVALID_CREDENTIALS") {
|
|
86
|
+
setErrors({ password: "Invalid email or password" });
|
|
87
|
+
emailShake.shake();
|
|
88
|
+
passwordShake.shake();
|
|
89
|
+
}
|
|
90
|
+
else if (code === "ACCOUNT_LOCKED") {
|
|
91
|
+
setErrors({ email: "Account is locked. Please contact support." });
|
|
92
|
+
emailShake.shake();
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
95
|
+
setErrors({ password: errorMessage });
|
|
96
|
+
passwordShake.shake();
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
finally {
|
|
100
|
+
setIsLoading(false);
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
const handleLogin = async () => {
|
|
104
|
+
const newErrors = validateForm();
|
|
105
|
+
if (Object.keys(newErrors).length > 0) {
|
|
106
|
+
setErrors(newErrors);
|
|
107
|
+
if (newErrors.email) {
|
|
108
|
+
emailShake.shake();
|
|
109
|
+
}
|
|
110
|
+
if (newErrors.password) {
|
|
111
|
+
passwordShake.shake();
|
|
112
|
+
}
|
|
113
|
+
await Haptics.notificationAsync(Haptics.NotificationFeedbackType.Error);
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
setErrors({});
|
|
117
|
+
await performLogin();
|
|
118
|
+
};
|
|
119
|
+
const routeAfterUnlock = (onboardingStep) => {
|
|
120
|
+
if (onboardingStep === "email_verification") {
|
|
121
|
+
router.replace({ pathname: routes.verifyEmail, params: { email } });
|
|
122
|
+
}
|
|
123
|
+
else if (onboardingStep === "mfa_enrollment") {
|
|
124
|
+
router.replace(routes.mfaEnroll);
|
|
125
|
+
}
|
|
126
|
+
else if (onboardingStep === "import") {
|
|
127
|
+
router.replace(routes.importData);
|
|
128
|
+
}
|
|
129
|
+
else {
|
|
130
|
+
// `complete`, null, undefined, or any unknown step the client
|
|
131
|
+
// doesn't recognise — the consumer's route guard re-evaluates
|
|
132
|
+
// and bounces to welcome / the right step if the server says
|
|
133
|
+
// onboarding isn't done. Default to home rather than stranding
|
|
134
|
+
// the user.
|
|
135
|
+
router.replace(routes.home);
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
const handlePasskeyLogin = async () => {
|
|
139
|
+
setPasskeyStep("passkey-loading");
|
|
140
|
+
setErrors({});
|
|
141
|
+
// Abort any prior ceremony before starting a new one so a
|
|
142
|
+
// double-tap doesn't race two outstanding credentials.get() calls.
|
|
143
|
+
passkeyAbortRef.current?.abort();
|
|
144
|
+
const controller = new AbortController();
|
|
145
|
+
passkeyAbortRef.current = controller;
|
|
146
|
+
try {
|
|
147
|
+
const trimmedEmail = email.trim().toLowerCase();
|
|
148
|
+
const result = await loginWithPasskey(trimmedEmail.length > 0 ? trimmedEmail : undefined, controller.signal);
|
|
149
|
+
await Haptics.notificationAsync(Haptics.NotificationFeedbackType.Success);
|
|
150
|
+
if (result.unlocked) {
|
|
151
|
+
setPasskeyStep("idle");
|
|
152
|
+
routeAfterUnlock(result.user.onboarding_step);
|
|
153
|
+
return;
|
|
154
|
+
}
|
|
155
|
+
setPendingOnboardingStep(result.user.onboarding_step ?? null);
|
|
156
|
+
setPasskeyStep("passkey-unlock");
|
|
157
|
+
}
|
|
158
|
+
catch (error) {
|
|
159
|
+
// Distinguish user-cancel / programmatic-abort from real
|
|
160
|
+
// failures. `NotAllowedError` (user cancel, timeout) and
|
|
161
|
+
// `AbortError` (signal abort) shouldn't paint a destructive
|
|
162
|
+
// error on the password field — the user knows they cancelled.
|
|
163
|
+
// Real failures (`SecurityError`, `UnknownError`, network) do
|
|
164
|
+
// want the inline message + shake so the user falls back to
|
|
165
|
+
// password.
|
|
166
|
+
const name = error instanceof Error ? error.name : undefined;
|
|
167
|
+
const isBenign = name === "NotAllowedError" || name === "AbortError";
|
|
168
|
+
if (!isBenign) {
|
|
169
|
+
await Haptics.notificationAsync(Haptics.NotificationFeedbackType.Error);
|
|
170
|
+
const message = error instanceof Error ? error.message : "Passkey sign-in failed";
|
|
171
|
+
setErrors({ password: message });
|
|
172
|
+
}
|
|
173
|
+
setPasskeyStep("idle");
|
|
174
|
+
}
|
|
175
|
+
};
|
|
176
|
+
const handleUnlockAfterPasskey = async () => {
|
|
177
|
+
if (!unlockPassword) {
|
|
178
|
+
setUnlockError("Master password is required");
|
|
179
|
+
await Haptics.notificationAsync(Haptics.NotificationFeedbackType.Error);
|
|
180
|
+
return;
|
|
181
|
+
}
|
|
182
|
+
setIsLoading(true);
|
|
183
|
+
try {
|
|
184
|
+
await unlockWithPassword(unlockPassword);
|
|
185
|
+
setUnlockPassword("");
|
|
186
|
+
setUnlockError("");
|
|
187
|
+
await Haptics.notificationAsync(Haptics.NotificationFeedbackType.Success);
|
|
188
|
+
routeAfterUnlock(pendingOnboardingStep ?? "complete");
|
|
189
|
+
setPasskeyStep("idle");
|
|
190
|
+
}
|
|
191
|
+
catch (error) {
|
|
192
|
+
const message = error instanceof Error ? error.message : "Failed to unlock the vault. Check your password.";
|
|
193
|
+
setUnlockError(message);
|
|
194
|
+
await Haptics.notificationAsync(Haptics.NotificationFeedbackType.Error);
|
|
195
|
+
}
|
|
196
|
+
finally {
|
|
197
|
+
setIsLoading(false);
|
|
198
|
+
}
|
|
199
|
+
};
|
|
200
|
+
return (<>
|
|
201
|
+
<SafeAreaView className="flex-1 bg-background">
|
|
202
|
+
<StatusBar style={isDark ? "light" : "dark"}/>
|
|
203
|
+
<ScrollView className="flex-1" contentContainerStyle={SCROLL_CONTENT_STYLE} keyboardShouldPersistTaps="handled" showsVerticalScrollIndicator={false}>
|
|
204
|
+
<View className="flex-1 justify-between px-6">
|
|
205
|
+
<View className="mt-4">
|
|
206
|
+
<IconButton variant="ghost" onPress={() => router.push(routes.welcome)} className="self-start" accessibilityLabel="Go back" accessibilityRole="button">
|
|
207
|
+
<Ionicons name="arrow-back" size={24} color={isDark ? "#FFFFFF" : "#000000"}/>
|
|
208
|
+
</IconButton>
|
|
209
|
+
</View>
|
|
210
|
+
{topAccessory}
|
|
211
|
+
|
|
212
|
+
<View className="flex-1 items-center justify-center">
|
|
213
|
+
<View className="mb-6 items-center">
|
|
214
|
+
<View className="flex-row items-center">
|
|
215
|
+
<Logo width={72} height={72} style={{ marginRight: -2 }}/>
|
|
216
|
+
<Heading className="text-4xl">{appName}</Heading>
|
|
217
|
+
</View>
|
|
218
|
+
</View>
|
|
219
|
+
|
|
220
|
+
<Card className="w-full max-w-[360px]">
|
|
221
|
+
<CardHeader>
|
|
222
|
+
<CardTitle>Sign In</CardTitle>
|
|
223
|
+
<CardDescription>Enter your credentials to sign in to {appName}</CardDescription>
|
|
224
|
+
</CardHeader>
|
|
225
|
+
|
|
226
|
+
<CardContent className="gap-4">
|
|
227
|
+
{/* Passkey CTA above email/password — passkeys are
|
|
228
|
+
the preferred primary factor when the device has
|
|
229
|
+
one enrolled. Email is optional; when blank the
|
|
230
|
+
server emits a discoverable-credential challenge
|
|
231
|
+
and the platform UI picks the account. */}
|
|
232
|
+
{passkeyEnabled ? (<>
|
|
233
|
+
<Button variant="outline" className="w-full" onPress={handlePasskeyLogin} isLoading={passkeyStep === "passkey-loading"} accessibilityLabel="Sign in with passkey" accessibilityRole="button" accessibilityHint="Use a passkey from this device to sign in" testID="login-passkey-button">
|
|
234
|
+
<View className="flex-row items-center justify-center">
|
|
235
|
+
<Ionicons name="key-outline" size={20} color={isDark ? "#FFFFFF" : "#000000"} className="mr-2"/>
|
|
236
|
+
<Text className="text-base font-medium">Sign in with passkey</Text>
|
|
237
|
+
</View>
|
|
238
|
+
</Button>
|
|
239
|
+
<SeparatorWithText />
|
|
240
|
+
</>) : null}
|
|
241
|
+
|
|
242
|
+
<ShakeField shake={emailShake} label="Email">
|
|
243
|
+
<EmailInput value={email} onChangeText={(text) => {
|
|
244
|
+
setEmail(text);
|
|
245
|
+
if (errors.email) {
|
|
246
|
+
setErrors({ ...errors, email: undefined });
|
|
247
|
+
}
|
|
248
|
+
}} autoFocus invalid={!!errors.email} autoComplete="email" accessibilityLabel="Email address" testID="login-email-input"/>
|
|
249
|
+
</ShakeField>
|
|
250
|
+
|
|
251
|
+
<ShakeField shake={passwordShake} label={passwordLabel}>
|
|
252
|
+
<PasswordInput value={password} onChangeText={(text) => {
|
|
253
|
+
setPassword(text);
|
|
254
|
+
if (errors.password) {
|
|
255
|
+
setErrors({ ...errors, password: undefined });
|
|
256
|
+
}
|
|
257
|
+
}} placeholder={passwordPlaceholder} invalid={!!errors.password} autoComplete="password" returnKeyType="done" onSubmitEditing={handleLogin} accessibilityLabel={passwordLabel} testID="login-password-input"/>
|
|
258
|
+
</ShakeField>
|
|
259
|
+
|
|
260
|
+
<View className="items-end">
|
|
261
|
+
<Text className="font-mono text-sm underline" onPress={() => router.push(routes.forgotPassword)} accessibilityRole="link" accessibilityLabel="Forgot password">
|
|
262
|
+
Forgot password?
|
|
263
|
+
</Text>
|
|
264
|
+
</View>
|
|
265
|
+
</CardContent>
|
|
266
|
+
|
|
267
|
+
<CardFooter className="flex-col gap-3 border-t-0">
|
|
268
|
+
<MutedText className="text-center text-sm">
|
|
269
|
+
Don't have an account?{" "}
|
|
270
|
+
<Text className="text-sm text-foreground underline" onPress={() => router.push(routes.register)} accessibilityRole="link" accessibilityLabel="Sign up">
|
|
271
|
+
Sign Up
|
|
272
|
+
</Text>
|
|
273
|
+
</MutedText>
|
|
274
|
+
|
|
275
|
+
<FormError message={firstError}/>
|
|
276
|
+
|
|
277
|
+
<Button className="w-full" onPress={handleLogin} isLoading={isLoading} accessibilityLabel="Sign in" accessibilityRole="button" accessibilityHint="Double tap to sign in with your credentials" testID="login-submit">
|
|
278
|
+
Sign In
|
|
279
|
+
</Button>
|
|
280
|
+
|
|
281
|
+
{socialAuth ? (<>
|
|
282
|
+
<SeparatorWithText />
|
|
283
|
+
{socialAuth}
|
|
284
|
+
</>) : null}
|
|
285
|
+
</CardFooter>
|
|
286
|
+
</Card>
|
|
287
|
+
</View>
|
|
288
|
+
|
|
289
|
+
<View className="mb-6"/>
|
|
290
|
+
</View>
|
|
291
|
+
</ScrollView>
|
|
292
|
+
</SafeAreaView>
|
|
293
|
+
|
|
294
|
+
{/* Passkey unlock dialog — shown only when the authenticator
|
|
295
|
+
did NOT honor the PRF extension. The session is already
|
|
296
|
+
established server-side; this prompt gathers the master
|
|
297
|
+
password so the consumer's `unlockWithPassword` handler can
|
|
298
|
+
derive the symmetric key locally before routing. */}
|
|
299
|
+
<Dialog visible={passkeyStep === "passkey-unlock"} onClose={() => {
|
|
300
|
+
setPasskeyStep("idle");
|
|
301
|
+
setUnlockPassword("");
|
|
302
|
+
setUnlockError("");
|
|
303
|
+
}} draggable dismissOnBackdrop={false}>
|
|
304
|
+
<View className="mb-5 items-center">
|
|
305
|
+
<View className={`mb-4 h-14 w-14 items-center justify-center rounded-full ${isDark ? "bg-white/10" : "bg-black/5"}`}>
|
|
306
|
+
<Ionicons name="lock-open-outline" size={28} color={isDark ? "#FFFFFF" : "#000000"}/>
|
|
307
|
+
</View>
|
|
308
|
+
<Heading className="mb-2 text-xl">{passkeyUnlockTitle}</Heading>
|
|
309
|
+
<Text className="mb-3 text-center text-sm leading-5">{passkeyUnlockDescription}</Text>
|
|
310
|
+
<PasswordInput value={unlockPassword} onChangeText={(text) => {
|
|
311
|
+
setUnlockPassword(text);
|
|
312
|
+
if (unlockError) {
|
|
313
|
+
setUnlockError("");
|
|
314
|
+
}
|
|
315
|
+
}} placeholder={passkeyUnlockPlaceholder} error={unlockError} autoComplete="password" returnKeyType="done" onSubmitEditing={handleUnlockAfterPasskey} accessibilityLabel="Master password" testID="login-passkey-unlock-input"/>
|
|
316
|
+
</View>
|
|
317
|
+
<DialogFooter style={{ justifyContent: "center" }}>
|
|
318
|
+
<DialogButton variant="primary" onPress={isLoading ? () => { } : handleUnlockAfterPasskey} accessibilityLabel="Unlock" accessibilityRole="button">
|
|
319
|
+
{isLoading ? "Unlocking…" : "Unlock"}
|
|
320
|
+
</DialogButton>
|
|
321
|
+
</DialogFooter>
|
|
322
|
+
</Dialog>
|
|
323
|
+
</>);
|
|
324
|
+
}
|
|
325
|
+
export default LoginScreen;
|
|
326
|
+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,CAAC;gBAChB,cAAc,CAAC,EAAE,CAAC,CAAC;YACrB,CAAC;QACH,CAAC,CAAC,CACF,WAAW,CAAC,CAAC,wBAAwB,CAAC,CACtC,KAAK,CAAC,CAAC,WAAW,CAAC,CACnB,YAAY,CAAC,UAAU,CACvB,aAAa,CAAC,MAAM,CACpB,eAAe,CAAC,CAAC,wBAAwB,CAAC,CAC1C,kBAAkB,CAAC,iBAAiB,CACpC,MAAM,CAAC,4BAA4B,EAEvC;QAAA,EAAE,IAAI,CACN;QAAA,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,EAAE,cAAc,EAAE,QAAQ,EAAE,CAAC,CAChD;UAAA,CAAC,YAAY,CACX,OAAO,CAAC,SAAS,CACjB,OAAO,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC,CAAC,wBAAwB,CAAC,CACzD,kBAAkB,CAAC,QAAQ,CAC3B,iBAAiB,CAAC,QAAQ,CAE1B;YAAA,CAAC,SAAS,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,QAAQ,CACtC;UAAA,EAAE,YAAY,CAChB;QAAA,EAAE,YAAY,CAChB;MAAA,EAAE,MAAM,CACV;IAAA,GAAG,CACJ,CAAC;AACJ,CAAC;AAED,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MfaChallengeScreen.d.ts","sourceRoot":"","sources":["../../../src/screens/auth/MfaChallengeScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAaxC,wBAAgB,kBAAkB,sBAwMjC;AAED,eAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import React, { useState } from "react";
|
|
2
|
+
import { ActivityIndicator, Platform, Pressable, Text, TextInput, View } from "react-native";
|
|
3
|
+
import { SafeAreaView } from "react-native-safe-area-context";
|
|
4
|
+
import { useNavigation } from "../../context/NavigationContext";
|
|
5
|
+
import { StatusBar } from "expo-status-bar";
|
|
6
|
+
import { Ionicons } from "@expo/vector-icons";
|
|
7
|
+
import { useColorScheme } from "nativewind";
|
|
8
|
+
import * as Haptics from "expo-haptics";
|
|
9
|
+
import AuthService from "../../services/auth.service";
|
|
10
|
+
import { useAppConfig } from "../../context/AppConfigContext";
|
|
11
|
+
import { getErrorMessage } from "../../utils/error";
|
|
12
|
+
export function MfaChallengeScreen() {
|
|
13
|
+
const { colorScheme } = useColorScheme();
|
|
14
|
+
const isDark = colorScheme === "dark";
|
|
15
|
+
const router = useNavigation();
|
|
16
|
+
const { routes } = useAppConfig();
|
|
17
|
+
const [code, setCode] = useState("");
|
|
18
|
+
const [isLoading, setIsLoading] = useState(false);
|
|
19
|
+
const [error, setError] = useState("");
|
|
20
|
+
const [isRecoveryMode, setIsRecoveryMode] = useState(false);
|
|
21
|
+
const handleVerify = async () => {
|
|
22
|
+
// Re-entry guard: a fast double-tap (button + onSubmitEditing)
|
|
23
|
+
// would otherwise re-issue verifyMfa before `setIsLoading(true)`
|
|
24
|
+
// had time to flow through React and disable the submit. Each
|
|
25
|
+
// verify burns a one-shot TOTP attempt server-side; cheaper to
|
|
26
|
+
// gate at the client.
|
|
27
|
+
if (isLoading) {
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
const trimmed = code.trim();
|
|
31
|
+
if (!isRecoveryMode && trimmed.length !== 6) {
|
|
32
|
+
setError("Please enter a 6-digit code");
|
|
33
|
+
await Haptics.notificationAsync(Haptics.NotificationFeedbackType.Error);
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
if (isRecoveryMode && trimmed.length === 0) {
|
|
37
|
+
setError("Please enter a recovery code");
|
|
38
|
+
await Haptics.notificationAsync(Haptics.NotificationFeedbackType.Error);
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
setIsLoading(true);
|
|
42
|
+
setError("");
|
|
43
|
+
try {
|
|
44
|
+
await AuthService.verifyMfa(trimmed);
|
|
45
|
+
await Haptics.notificationAsync(Haptics.NotificationFeedbackType.Success);
|
|
46
|
+
router.replace(routes.home);
|
|
47
|
+
}
|
|
48
|
+
catch (err) {
|
|
49
|
+
setError(getErrorMessage(err, "Invalid code"));
|
|
50
|
+
setCode("");
|
|
51
|
+
await Haptics.notificationAsync(Haptics.NotificationFeedbackType.Error);
|
|
52
|
+
}
|
|
53
|
+
finally {
|
|
54
|
+
setIsLoading(false);
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
const toggleRecoveryMode = () => {
|
|
58
|
+
setIsRecoveryMode(!isRecoveryMode);
|
|
59
|
+
setCode("");
|
|
60
|
+
setError("");
|
|
61
|
+
};
|
|
62
|
+
const inputStyle = {
|
|
63
|
+
borderWidth: 1,
|
|
64
|
+
borderColor: error ? "#EF4444" : isDark ? "#333333" : "#E5E5E5",
|
|
65
|
+
borderRadius: 8,
|
|
66
|
+
paddingHorizontal: 12,
|
|
67
|
+
paddingVertical: Platform.OS === "ios" ? 12 : 8,
|
|
68
|
+
backgroundColor: isDark ? "#0A0A0A" : "#FAFAFA",
|
|
69
|
+
};
|
|
70
|
+
return (<SafeAreaView className="flex-1" style={{ backgroundColor: isDark ? "#000000" : "#FFFFFF" }}>
|
|
71
|
+
<StatusBar style={isDark ? "light" : "dark"}/>
|
|
72
|
+
<View className="flex-1 items-center justify-center px-6">
|
|
73
|
+
<View className="w-full max-w-[360px]">
|
|
74
|
+
<View className="items-center mb-6">
|
|
75
|
+
<Ionicons name="shield-checkmark-outline" size={48} color={isDark ? "#FFFFFF" : "#000000"}/>
|
|
76
|
+
</View>
|
|
77
|
+
|
|
78
|
+
<Text className="font-sans-bold text-2xl text-center mb-2" style={{ color: isDark ? "#FFFFFF" : "#000000" }}>
|
|
79
|
+
Two-Factor Authentication
|
|
80
|
+
</Text>
|
|
81
|
+
|
|
82
|
+
<Text className="font-sans text-sm text-center mb-8" style={{ color: isDark ? "#999999" : "#666666", lineHeight: 22 }}>
|
|
83
|
+
{isRecoveryMode
|
|
84
|
+
? "Enter one of your recovery codes"
|
|
85
|
+
: "Enter the 6-digit code from your authenticator app"}
|
|
86
|
+
</Text>
|
|
87
|
+
|
|
88
|
+
{error ? (<View className="rounded-lg p-3 mb-4" style={{
|
|
89
|
+
backgroundColor: isDark ? "#1A0000" : "#FEF2F2",
|
|
90
|
+
borderWidth: 1,
|
|
91
|
+
borderColor: isDark ? "#7F1D1D" : "#FECACA",
|
|
92
|
+
}}>
|
|
93
|
+
<Text className="font-sans text-sm text-center" style={{ color: "#EF4444" }}>
|
|
94
|
+
{error}
|
|
95
|
+
</Text>
|
|
96
|
+
</View>) : null}
|
|
97
|
+
|
|
98
|
+
{isRecoveryMode ? (<TextInput value={code} onChangeText={(text) => {
|
|
99
|
+
setCode(text);
|
|
100
|
+
if (error) {
|
|
101
|
+
setError("");
|
|
102
|
+
}
|
|
103
|
+
}} placeholder="Enter recovery code" placeholderTextColor={isDark ? "#999999" : "#666666"} className="font-mono text-lg text-center tracking-wide" style={{
|
|
104
|
+
...inputStyle,
|
|
105
|
+
color: isDark ? "#FFFFFF" : "#000000",
|
|
106
|
+
}} autoCapitalize="none" autoCorrect={false} autoFocus returnKeyType="done" onSubmitEditing={handleVerify} accessibilityLabel="Recovery code"/>) : (<TextInput value={code} onChangeText={(text) => {
|
|
107
|
+
const digits = text.replace(/[^0-9]/g, "").slice(0, 6);
|
|
108
|
+
setCode(digits);
|
|
109
|
+
if (error) {
|
|
110
|
+
setError("");
|
|
111
|
+
}
|
|
112
|
+
}} placeholder="000000" placeholderTextColor={isDark ? "#999999" : "#666666"} className="font-mono text-center" style={{
|
|
113
|
+
...inputStyle,
|
|
114
|
+
fontSize: 32,
|
|
115
|
+
color: isDark ? "#FFFFFF" : "#000000",
|
|
116
|
+
letterSpacing: 12,
|
|
117
|
+
}} keyboardType="number-pad" maxLength={6} autoFocus returnKeyType="done" onSubmitEditing={handleVerify} accessibilityLabel="Authenticator code"/>)}
|
|
118
|
+
|
|
119
|
+
<Pressable onPress={handleVerify} disabled={isLoading} className="rounded-lg items-center mt-5" style={({ pressed }) => ({
|
|
120
|
+
backgroundColor: isDark ? "#FFFFFF" : "#000000",
|
|
121
|
+
paddingVertical: 14,
|
|
122
|
+
opacity: pressed || isLoading ? 0.7 : 1,
|
|
123
|
+
})} accessibilityRole="button" accessibilityLabel="Verify" accessibilityHint="Double tap to verify your code">
|
|
124
|
+
{isLoading ? (<ActivityIndicator color={isDark ? "#000000" : "#FFFFFF"}/>) : (<Text className="font-sans-bold text-base" style={{ color: isDark ? "#000000" : "#FFFFFF" }}>
|
|
125
|
+
Verify
|
|
126
|
+
</Text>)}
|
|
127
|
+
</Pressable>
|
|
128
|
+
|
|
129
|
+
<Pressable onPress={toggleRecoveryMode} className="mt-5 items-center" hitSlop={{ top: 10, bottom: 10, left: 10, right: 10 }} accessibilityRole="button" accessibilityLabel={isRecoveryMode ? "Use authenticator code" : "Use recovery code"}>
|
|
130
|
+
<Text className="font-sans text-sm underline" style={{ color: isDark ? "#999999" : "#666666" }}>
|
|
131
|
+
{isRecoveryMode ? "Use authenticator code" : "Use recovery code"}
|
|
132
|
+
</Text>
|
|
133
|
+
</Pressable>
|
|
134
|
+
</View>
|
|
135
|
+
</View>
|
|
136
|
+
</SafeAreaView>);
|
|
137
|
+
}
|
|
138
|
+
export default MfaChallengeScreen;
|
|
139
|
+
//# sourceMappingURL=MfaChallengeScreen.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MfaChallengeScreen.jsx","sourceRoot":"","sources":["../../../src/screens/auth/MfaChallengeScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAC7F,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,C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mBAAmB,CAClE;YAAA,EAAE,IAAI,CACR;UAAA,EAAE,SAAS,CACb;QAAA,EAAE,IAAI,CACR;MAAA,EAAE,IAAI,CACR;IAAA,EAAE,YAAY,CAAC,CAChB,CAAC;AACJ,CAAC;AAED,eAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface MfaEnrollScreenProps {
|
|
3
|
+
/**
|
|
4
|
+
* Optional promo widget rendered on the prompt step (vault advertises
|
|
5
|
+
* its authenticator app here). When omitted, the screen renders
|
|
6
|
+
* nothing in that slot.
|
|
7
|
+
*/
|
|
8
|
+
authenticatorAppPromo?: React.ReactNode;
|
|
9
|
+
}
|
|
10
|
+
export declare function MfaEnrollScreen({ authenticatorAppPromo }?: MfaEnrollScreenProps): React.JSX.Element;
|
|
11
|
+
export default MfaEnrollScreen;
|
|
12
|
+
//# sourceMappingURL=MfaEnrollScreen.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MfaEnrollScreen.d.ts","sourceRoot":"","sources":["../../../src/screens/auth/MfaEnrollScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AA8B3D,MAAM,WAAW,oBAAoB;IACnC;;;;OAIG;IACH,qBAAqB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACzC;AAED,wBAAgB,eAAe,CAAC,EAAE,qBAAqB,EAAE,GAAE,oBAAyB,qBA0VnF;AAED,eAAe,eAAe,CAAC"}
|