mirror of
https://github.com/balzack/databag.git
synced 2025-02-11 19:19:16 +00:00
enabling admin mfa login
This commit is contained in:
parent
2b61d25726
commit
901c615459
@ -140,7 +140,7 @@ export function Admin() {
|
||||
<Text style={styles.mfaCancelLabel}>{ state.strings.cancel }</Text>
|
||||
</TouchableOpacity>
|
||||
{ state.mfaCode != '' && (
|
||||
<TouchableOpacity style={styles.mfaConfirm} onPress={actions.login}>
|
||||
<TouchableOpacity style={styles.mfaConfirm} onPress={actions.access}>
|
||||
<Text style={styles.mfaConfirmLabel}>{ state.strings.mfaConfirm }</Text>
|
||||
</TouchableOpacity>
|
||||
)}
|
||||
|
@ -88,7 +88,7 @@ export function useAdmin() {
|
||||
if (unclaimed) {
|
||||
await setNodeStatus(node, state.token);
|
||||
}
|
||||
try {
|
||||
try {
|
||||
const session = await setNodeAccess(node, state.token, state.mfaCode);
|
||||
updateState({ server: node, busy: false });
|
||||
navigate('/dashboard', { state: { server: node, token: session }});
|
||||
@ -109,6 +109,7 @@ export function useAdmin() {
|
||||
updateState({ busy: false });
|
||||
throw new Error("access failed");
|
||||
}
|
||||
updateState({ busy: false });
|
||||
}
|
||||
},
|
||||
setCode: (mfaCode) => {
|
||||
|
Loading…
Reference in New Issue
Block a user