mirror of
https://github.com/passbolt/go-passbolt-cli.git
synced 2025-07-13 05:09:09 +00:00
Replace usages of term.ReadPassword with util.ReadPassword
This commit is contained in:
parent
bfbc15bd0d
commit
440f41a2af
3 changed files with 5 additions and 10 deletions
|
@ -97,12 +97,11 @@ func GetClient(ctx context.Context) (*api.Client, error) {
|
|||
for i := 0; i < 3; i++ {
|
||||
var code string
|
||||
fmt.Print("Enter TOTP:")
|
||||
bytepw, err := term.ReadPassword(int(syscall.Stdin))
|
||||
code, err := ReadPassword()
|
||||
if err != nil {
|
||||
fmt.Printf("\n")
|
||||
return http.Cookie{}, fmt.Errorf("Reading TOTP: %w", err)
|
||||
}
|
||||
code = string(bytepw)
|
||||
fmt.Printf("\n")
|
||||
req := api.MFAChallangeResponse{
|
||||
TOTP: code,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue