mirror of
https://github.com/kanidm/kanidm.git
synced 2025-02-23 20:47:01 +01:00
* fixes #503 * Adding comment for future archeologists. Hello, future-people!
This commit is contained in:
parent
554ff3bb1b
commit
93d5c5434d
|
@ -6,7 +6,7 @@ use libc::umask;
|
|||
use std::collections::BTreeMap;
|
||||
use std::fs::{create_dir, File};
|
||||
use std::io::ErrorKind;
|
||||
use std::io::{self, BufReader, BufWriter};
|
||||
use std::io::{self, BufReader, BufWriter, Write};
|
||||
use std::path::PathBuf;
|
||||
use webauthn_authenticator_rs::{u2fhid::U2FHid, RequestChallengeResponse, WebauthnAuthenticator};
|
||||
|
||||
|
@ -144,7 +144,9 @@ impl LoginOpt {
|
|||
|
||||
fn do_totp(&self, client: &mut KanidmClient) -> Result<AuthResponse, ClientError> {
|
||||
let totp = loop {
|
||||
println!("Enter TOTP: ");
|
||||
print!("Enter TOTP: ");
|
||||
// We flush stdout so it'll write the buffer to screen, continuing operation. Without it, the application halts.
|
||||
io::stdout().flush().unwrap();
|
||||
let mut buffer = String::new();
|
||||
if let Err(e) = io::stdin().read_line(&mut buffer) {
|
||||
eprintln!("Failed to read from stdin -> {:?}", e);
|
||||
|
|
Loading…
Reference in a new issue