Skip to content

Commit 1e6209d

Browse files
committed
Add support for email sign in codes
Fixes #1183
1 parent 5d3abd3 commit 1e6209d

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

pyrogram/client.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,7 @@ async def authorize(self) -> User:
358358
enums.SentCodeType.CALL: "phone call",
359359
enums.SentCodeType.FLASH_CALL: "phone flash call",
360360
enums.SentCodeType.FRAGMENT_SMS: "Fragment SMS",
361+
enums.SentCodeType.EMAIL_CODE: "email code"
361362
}
362363

363364
print(f"The confirmation code has been sent via {sent_code_descriptions[sent_code.type]}")

pyrogram/enums/sent_code_type.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,6 @@ class SentCodeType(AutoName):
4040

4141
FRAGMENT_SMS = raw.types.auth.SentCodeTypeFragmentSms
4242
"The code was sent via Fragment SMS."
43+
44+
EMAIL_CODE = raw.types.auth.SentCodeTypeEmailCode
45+
"The code was sent via email."

0 commit comments

Comments
 (0)