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:
parent
cbb817b5b7
commit
710e913024
10 changed files with 363 additions and 20 deletions
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue