Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2fa password is freeze #89

Open
frech87 opened this issue Aug 12, 2024 · 2 comments
Open

2fa password is freeze #89

frech87 opened this issue Aug 12, 2024 · 2 comments

Comments

@frech87
Copy link

frech87 commented Aug 12, 2024

Hi. When run auth example, after input 2fa password process is waiting and don't return success or error

@celestix
Copy link
Owner

Can you provide more details and screenshot or screen recording of the exact behaviour?

@frech87
Copy link
Author

frech87 commented Aug 13, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants