Either a string or a callback that returns a string for the phone to use to login.
whether to send the code through SMS or not.
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).
optional string or callback that should return the 2FA password if present.
the password hint will be sent in the hint param
in case of a new account creation this callback should return a first name and last name [first,last]
.
a qrCode token for login through qrCode.
this would need a QR code that you should scan with another app to login with.
when an error happens during auth this function will be called with the error.
if this returns true the auth operation will stop.
Generated using TypeDoc
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
.