Optionalemailcallback to get email address when email setup is required.
Called first when auth.SentCodeTypeSetUpEmailRequired is received.
Optionalemailcallback for email verification when Telegram requires email setup or code.
Called when auth.SentCodeTypeSetUpEmailRequired or auth.SentCodeTypeEmailCode is received.
For setup: should return email address to use and then handle verification code.
For existing email: should return the verification result (code, Google token, or Apple token).
Optionalfirstin case of a new account creation this callback should return a first name and last name [first,last].
Optionalforcewhether to send the code through SMS or not.
when an error happens during auth this function will be called with the error.
if this returns true the auth operation will stop.
Optionalpasswordoptional string or callback that should return the 2FA password if present.
the password hint will be sent in the hint param
callback that should return the login code that telegram sent.
has optional bool isCodeViaApp param for whether the code was sent through the app (true) or an SMS (false).
Either a string or a callback that returns a string for the phone to use to login.
Optionalqra qrCode token for login through qrCode.
this would need a QR code that you should scan with another app to login with.
Optionalreoptional callback for handling reCAPTCHA.
For when you want to login as a Api.User
this should handle all needed steps for authorization as a user.
to stop the operation at any point just raise and error with the message
AUTH_USER_CANCEL.