Skip to main content

account.password

Configuration for two-factor authorization

type tg.AccountPassword struct { /* ... */ }

Fields​

NameTypeRequiredDescription
HasRecoverybool—Whether the user has a recovery method configured
HasSecureValuesbool—Whether telegram passport is enabled
HasPasswordbool—Whether the user has a password
CurrentAlgoPasswordKdfAlgoClass—The KDF algorithm for SRP two-factor authentication of the current password
SRPB[]byte—Srp B param for SRP authorization
SRPIDint64—Srp ID param for SRP authorization
Hintstring—Text hint for the password
EmailUnconfirmedPatternstring—A password recovery email with the specified pattern is still awaiting verification
NewAlgoPasswordKdfAlgoClassyesThe KDF algorithm for SRP two-factor authentication to use when creating new passwords
NewSecureAlgoSecurePasswordKdfAlgoClassyesThe KDF algorithm for telegram passport
SecureRandom[]byteyesSecure random string
PendingResetDateint—The 2FA password will be automatically removed at this date, unless the user cancels the operation
LoginEmailPatternstring—A verified login email with the specified pattern is configured

Returned by​

References​