Allow to call resendAuthenticationCode for Firenase SMS.
This commit is contained in:
parent
200b334f49
commit
f3225b7106
@ -56,7 +56,7 @@ authenticationCodeTypeFragment url:string length:int32 = AuthenticationCodeType;
|
||||
authenticationCodeTypeFirebaseAndroid nonce:bytes length:int32 = AuthenticationCodeType;
|
||||
|
||||
//@description An authentication code is delivered via Firebase Authentication to the official iOS application
|
||||
//@receipt Receipt of successful applikation token validation to compare with receipt from push notification
|
||||
//@receipt Receipt of successful application token validation to compare with receipt from push notification
|
||||
//@push_timeout Time after the next authentication method is supposed to be used if verification push notification isn't received, in seconds
|
||||
//@length Length of the code
|
||||
authenticationCodeTypeFirebaseIos receipt:string push_timeout:int32 length:int32 = AuthenticationCodeType;
|
||||
|
@ -17,6 +17,12 @@ void SendCodeHelper::on_sent_code(telegram_api::object_ptr<telegram_api::auth_se
|
||||
sent_code_info_ = get_sent_authentication_code_info(std::move(sent_code->type_));
|
||||
next_code_info_ = get_authentication_code_info(std::move(sent_code->next_type_));
|
||||
next_code_timestamp_ = Time::now() + sent_code->timeout_;
|
||||
|
||||
if (next_code_info_.type == AuthenticationCodeInfo::Type::None &&
|
||||
(sent_code_info_.type == AuthenticationCodeInfo::Type::FirebaseAndroid ||
|
||||
sent_code_info_.type == AuthenticationCodeInfo::Type::FirebaseIos)) {
|
||||
next_code_info_ = {AuthenticationCodeInfo::Type::Sms, sent_code_info_.length, string()};
|
||||
}
|
||||
}
|
||||
|
||||
void SendCodeHelper::on_phone_code_hash(string &&phone_code_hash) {
|
||||
|
Loading…
Reference in New Issue
Block a user