docs(login): support local passcode

This commit is contained in:
iyear 2022-11-23 20:03:21 +08:00
parent a909abc08b
commit 72844d89b3
2 changed files with 8 additions and 3 deletions

View File

@ -45,6 +45,8 @@ Move-Item tdl.exe C:\Windows\System32
```shell
# login with existing official desktop clients (recommended)
tdl login -n quickstart -d /path/to/Desktop-Telegram-Client
# if you set a local passcode
tdl login -n quickstart -d /path/to/Desktop-Telegram-Client -p YOUR_PASSCODE
# or login with phone & code
tdl login -n quickstart
@ -104,7 +106,9 @@ If you have official desktop clients locally, you can import existing sessions.
This may reduce the risk of blocking, but is unproven:
```shell
tdl login -d /path/to/Telegram # recommended
tdl login -d /path/to/Telegram
# if you set a local passcode
tdl login -d /path/to/Telegram -p YOUR_PASSCODE
```
Login to Telegram with phone & code:

View File

@ -9,8 +9,9 @@ tdl login [flags]
### Options
```
-d, --desktop string Official desktop client path, import session from it
-h, --help help for login
-d, --desktop string official desktop client path, import session from it
-h, --help help for login
-p, --passcode string passcode for desktop client, keep empty if no passcode
```
### Options inherited from parent commands