Fix login link URL.
GitOrigin-RevId: 064e31b5b095db03ccd7cb9cb3b4e1fabc92aba0
This commit is contained in:
parent
395a96a764
commit
3d574e39c3
@ -102,7 +102,7 @@ tl_object_ptr<td_api::AuthorizationState> AuthManager::get_authorization_state_o
|
|||||||
case State::WaitCode:
|
case State::WaitCode:
|
||||||
return send_code_helper_.get_authorization_state_wait_code();
|
return send_code_helper_.get_authorization_state_wait_code();
|
||||||
case State::WaitQrCodeConfirmation:
|
case State::WaitQrCodeConfirmation:
|
||||||
return make_tl_object<td_api::authorizationStateWaitOtherDeviceConfirmation>("tg://login?" +
|
return make_tl_object<td_api::authorizationStateWaitOtherDeviceConfirmation>("tg://login?token=" +
|
||||||
base64url_encode(login_token_));
|
base64url_encode(login_token_));
|
||||||
case State::WaitPassword:
|
case State::WaitPassword:
|
||||||
return make_tl_object<td_api::authorizationStateWaitPassword>(
|
return make_tl_object<td_api::authorizationStateWaitPassword>(
|
||||||
|
@ -4141,7 +4141,7 @@ void ContactsManager::get_account_ttl(Promise<int32> &&promise) const {
|
|||||||
|
|
||||||
void ContactsManager::confirm_qr_code_authentication(string link,
|
void ContactsManager::confirm_qr_code_authentication(string link,
|
||||||
Promise<td_api::object_ptr<td_api::session>> &&promise) {
|
Promise<td_api::object_ptr<td_api::session>> &&promise) {
|
||||||
Slice prefix("tg://login?");
|
Slice prefix("tg://login?token=");
|
||||||
if (!begins_with(to_lower(link), prefix)) {
|
if (!begins_with(to_lower(link), prefix)) {
|
||||||
return promise.set_error(Status::Error(400, "AUTH_TOKEN_INVALID"));
|
return promise.set_error(Status::Error(400, "AUTH_TOKEN_INVALID"));
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user