diff --git a/data/web/corefork.telegram.org/api/auth.html b/data/web/corefork.telegram.org/api/auth.html index 25226bc985..6d5b03b030 100644 --- a/data/web/corefork.telegram.org/api/auth.html +++ b/data/web/corefork.telegram.org/api/auth.html @@ -60,7 +60,9 @@ When invoking auth.sendCode, all logout toke If any of the logout tokens matches the account we're trying to login into and the token hasn't expired, auth.sendCode will directly return a SESSION_PASSWORD_NEEDED RPC error, directly asking the user to enter the 2FA password, without sending any authorization code.

Otherwise, the system will send an authorization code using the following logic:

Code types

-
auth.sentCodeTypeApp#3dbb5986 length:int = auth.SentCodeType;
+
codeSettings#ad253d78 flags:# allow_flashcall:flags.0?true current_number:flags.1?true allow_app_hash:flags.4?true allow_missed_call:flags.5?true allow_firebase:flags.7?true logout_tokens:flags.6?Vector<bytes> token:flags.8?string app_sandbox:flags.8?Bool = CodeSettings;
+
+auth.sentCodeTypeApp#3dbb5986 length:int = auth.SentCodeType;
 auth.sentCodeTypeSms#c000bba2 length:int = auth.SentCodeType;
 auth.sentCodeTypeCall#5353e5a7 length:int = auth.SentCodeType;
 auth.sentCodeTypeFlashCall#ab03c6d9 pattern:string = auth.SentCodeType;
@@ -68,24 +70,18 @@ If any of the logout tokens matches the account we're trying to login into and t
 auth.sentCodeTypeEmailCode#5a159841 flags:# apple_signin_allowed:flags.0?true google_signin_allowed:flags.1?true email_pattern:string length:int next_phone_login_date:flags.2?int = auth.SentCodeType;
 auth.sentCodeTypeSetUpEmailRequired#a5491dea flags:# apple_signin_allowed:flags.0?true google_signin_allowed:flags.1?true = auth.SentCodeType;
 auth.sentCodeTypeFragmentSms#d9565c39 url:string length:int = auth.SentCodeType;
-auth.sentCodeTypeFirebaseSms#e57b1432 flags:# nonce:flags.0?bytes receipt:flags.1?string push_timeout:flags.1?int length:int = auth.SentCodeType;
-

The system will automatically choose how to send the authorization code; there are multiple possible ways the code can arrive, signaled to the client via the auth.SentCodeType constructor returned by auth.sendCode:

- -

The auth.sendCode method also has parameters for enabling/disabling use of flash calls and missed calls, and allows passing an SMS token that will be included in the sent SMS. +auth.sentCodeTypeFirebaseSms#e57b1432 flags:# nonce:flags.0?bytes receipt:flags.1?string push_timeout:flags.1?int length:int = auth.SentCodeType; + +auth.sentCode#5e002502 flags:# type:auth.SentCodeType phone_code_hash:string next_type:flags.1?auth.CodeType timeout:flags.2?int = auth.SentCode; +auth.sentCodeSuccess#2390fe44 authorization:auth.Authorization = auth.SentCode; + +---functions--- + +auth.sendCode#a677244f phone_number:string api_id:int api_hash:string settings:CodeSettings = auth.SentCode; +auth.resendCode#3ef1a9bf phone_number:string phone_code_hash:string = auth.SentCode; + +auth.requestFirebaseSms#89464b50 flags:# phone_number:string phone_code_hash:string safety_net_token:flags.0?string ios_push_secret:flags.1?string = Bool;

+

The auth.sendCode method has parameters for enabling/disabling use of flash calls and missed calls, and allows passing an SMS token that will be included in the sent SMS. For example, the latter is required in newer versions of android, to use the android SMS receiver APIs.

The returned auth.SentCode object will contain multiple parameters:

@@ -103,7 +99,7 @@ For example, the latter is required in newer versions of android, to use the - + @@ -117,6 +113,27 @@ For example, the latter is required in newer versions of android, to use the
phone_code_hash stringPhone code hash, to be stored and later re-used with auth.signInPhone code hash, to be stored and re-used in later method calls
next_type
+

The system will automatically choose how to send the authorization code; there are multiple possible ways the code can arrive, signaled to the client via the type field of the auth.SentCodeType constructor:

+

If the message takes too long (timeout seconds) to arrive at the phone, the auth.resendCode method may be invoked to resend a code of type next_type. If the same happens again, you can use auth.resendCode with the next_type returned by the previous call to auth.resendCode. To cancel the verification code use auth.cancelCode.

diff --git a/data/web/corefork.telegram.org/api/layers.html b/data/web/corefork.telegram.org/api/layers.html index 410ae99169..3d1dedc32a 100644 --- a/data/web/corefork.telegram.org/api/layers.html +++ b/data/web/corefork.telegram.org/api/layers.html @@ -156,7 +156,7 @@
  • Added messages.sendBotRequestedPeer - Send a chosen peer, as requested by a keyboardButtonRequestPeer button.
  • Added account.getDefaultProfilePhotoEmojis - Get a set of suggested custom emoji stickers that can be used as profile picture
  • Added account.getDefaultGroupPhotoEmojis - Get a set of suggested custom emoji stickers that can be used as group picture
  • -
  • Added auth.requestFirebaseSms -
  • +
  • Added auth.requestFirebaseSms - Request an SMS code with a SafetyNet/Firebase attestation.
  • Added messages.getEmojiGroups - Represents a list of emoji categories, to be used when selecting custom emojis.
  • Added messages.getEmojiStatusGroups - Represents a list of emoji categories, to be used when selecting custom emojis to set as custom emoji status.
  • Added messages.getEmojiProfilePhotoGroups - Represents a list of emoji categories, to be used when selecting custom emojis to set as profile picture.
  • @@ -182,7 +182,7 @@
  • Added keyboardButtonRequestPeer - Prompts the user to select and share a peer with the bot using messages.sendBotRequestedPeer
  • Added emojiListNotModified - The list of custom emojis hasn't changed.
  • Added emojiList - Represents a list of custom emojis.
  • -
  • Added auth.sentCodeTypeFirebaseSms - An authentication code should be delivered via Firebase Authentication.
  • +
  • Added auth.sentCodeTypeFirebaseSms - An authentication code should be delivered via SMS after SafetyNet/Firebase attestation, as described in the auth documentation ».
  • Added emojiGroup - Represents an emoji category.
  • Added messages.emojiGroupsNotModified - The list of emoji categories hasn't changed.
  • Added messages.emojiGroups - Represents a list of emoji categories.