mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-26 03:39:58 -07:00
TOTP update
This commit is contained in:
21
applications/plugins/totp/cli/cli_helpers.c
Normal file
21
applications/plugins/totp/cli/cli_helpers.c
Normal file
@@ -0,0 +1,21 @@
|
||||
#include "cli_helpers.h"
|
||||
#include <cli/cli.h>
|
||||
|
||||
bool totp_cli_ensure_authenticated(const PluginState* plugin_state, Cli* cli) {
|
||||
if(plugin_state->current_scene == TotpSceneAuthentication) {
|
||||
TOTP_CLI_PRINTF("Pleases enter PIN on your flipper device\r\n");
|
||||
|
||||
while(plugin_state->current_scene == TotpSceneAuthentication &&
|
||||
!cli_cmd_interrupt_received(cli)) {
|
||||
furi_delay_ms(100);
|
||||
}
|
||||
|
||||
TOTP_CLI_DELETE_LAST_LINE();
|
||||
|
||||
if(plugin_state->current_scene == TotpSceneAuthentication) { //-V547
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
Reference in New Issue
Block a user