eilvelia / tdl

Node.js bindings to TDLib 🥒
MIT License
411 stars 53 forks source link

When relogin cant get auth code #152

Closed unityatadev closed 6 months ago

unityatadev commented 7 months ago

I succesfully login and then logout . But then when try relogin I dont get auth code in telegram . clientMap is array of clients. //relogin

await clientMap[telegram_client_id].login(() => ({
            type: 'user',
            getPhoneNumber: retry => retry
                ? Promise.reject('Invalid phone number')
                : Promise.resolve(telegram_client[0].phone),
            getPassword: (passwordHint, retry) => retry
                ? Promise.reject('Invalid password')
                : Promise.resolve(telegram_client[0].two_factor_authentication)
        }));
eilvelia commented 7 months ago

I think you should log in again using a different client.

unityatadev commented 6 months ago

thank you a lot. It worked I replaced my old client with new and now getting all updates and auth code