gotgproto
gotgproto copied to clipboard
2fa password is freeze
Hi. When run auth example, after input 2fa password process is waiting and don't return success or error
Can you provide more details and screenshot or screen recording of the exact behaviour?
From example/auth-using-api-base
`case "passwd":
passwd := req.URL.Query().Get("passwd")
wa.ReceivePasswd(passwd)
for wa.authStatus.Event == gotgproto.AuthStatusPasswordAsked ||
wa.authStatus.Event == gotgproto.AuthStatusPasswordRetrial {
continue
}`
`func (w *WebAuth) AskPassword() (string, error) {
if w.authStatus.Event == gotgproto.AuthStatusPasswordRetrial {
fmt.Println("The 2FA password you just entered seems to be incorrect,")
fmt.Println("Attempts Left:", w.authStatus.AttemptsLeft)
fmt.Println("Please try again....")
}
fmt.Println("waiting for 2fa password...")
code := <-w.passwdChan
return code, nil
}`
Input otp code, response "2fa asked" and then input 2fa password, not response and waiting. When check auth status, return 2fa asked. But in telegram->setting->device I find new successfully connected devices