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
This commit is contained in:
Paul Frazee 2024-04-22 19:18:13 -07:00 committed by GitHub
parent cbb817b5b7
commit 710e913024
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 363 additions and 20 deletions

View file

@ -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}) {
@ -690,6 +691,13 @@ export function SettingsScreen({}: Props) {
</View>
)}
<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>