about summary refs log tree commit diff
path: root/src/view/screens/Settings/index.tsx
diff options
context:
space:
mode:
authorPaul Frazee <pfrazee@gmail.com>2024-04-22 19:18:13 -0700
committerGitHub <noreply@github.com>2024-04-22 19:18:13 -0700
commit710e913024bab2d1c4e4f6179b089afd8eb5ba9f (patch)
treec227ae63e4b3eb79f0ab7d936126e0eaf576b526 /src/view/screens/Settings/index.tsx
parentcbb817b5b707042afefbf8ca46a7104d62349492 (diff)
downloadvoidsky-710e913024bab2d1c4e4f6179b089afd8eb5ba9f.tar.zst
Email auth factor (#3602)
* Add email 2fa toggle

* Add UI elements needed for 2fa codes in login

* Wire up to the server

* Give a better failure message for bad 2fa code

* Handle enter key in login form 2fa field

* Trim spaces

* Improve error message
Diffstat (limited to 'src/view/screens/Settings/index.tsx')
-rw-r--r--src/view/screens/Settings/index.tsx8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/view/screens/Settings/index.tsx b/src/view/screens/Settings/index.tsx
index bb38da676..1211aa5c5 100644
--- a/src/view/screens/Settings/index.tsx
+++ b/src/view/screens/Settings/index.tsx
@@ -64,6 +64,7 @@ import {ScrollView} from 'view/com/util/Views'
 import {useDialogControl} from '#/components/Dialog'
 import {BirthDateSettingsDialog} from '#/components/dialogs/BirthDateSettings'
 import {navigate, resetToTab} from '#/Navigation'
+import {Email2FAToggle} from './Email2FAToggle'
 import {ExportCarDialog} from './ExportCarDialog'
 
 function SettingsAccountCard({account}: {account: SessionAccount}) {
@@ -691,6 +692,13 @@ export function SettingsScreen({}: Props) {
         )}
         <View style={styles.spacer20} />
         <Text type="xl-bold" style={[pal.text, styles.heading]}>
+          <Trans>Two-factor authentication</Trans>
+        </Text>
+        <View style={[pal.view, styles.toggleCard]}>
+          <Email2FAToggle />
+        </View>
+        <View style={styles.spacer20} />
+        <Text type="xl-bold" style={[pal.text, styles.heading]}>
           <Trans>Account</Trans>
         </Text>
         <TouchableOpacity