nodegin / tglib

TDLib (Telegram Database library) bindings for Node.js
114 stars 16 forks source link

Make auth possible via separate method #27

Closed mnb3000 closed 6 years ago

mnb3000 commented 6 years ago

Can you split auth into 2 parts? First part is constructing Client, it requests auth code and the second one is completing sign in via client.completeAuth method which has code as an argument. This will cut the need of getInput, which can be made by a developer of an app if needed

mnb3000 commented 6 years ago

The same template applies to authorizationStateWaitPassword While not authorized all methids that require auth reject the promises with Unauthorized error

nodegin commented 6 years ago

I believe this is an duplicate issue of #26? I am working on it in the next release, it will come out once I finalize the codes.

mnb3000 commented 6 years ago

Thx in advance. If you need any help - pm me in Telegram Also, maybe you should make a dev branch which would have latest unreleased changes for devs to see. This way we'll be able to see what features are currently in dev

mnb3000 commented 6 years ago

If you are familiar with python - check out the Telethon lib and the way it handles auth

nodegin commented 6 years ago

Now available in version 2.0.0 (f02d852)

nodegin commented 6 years ago

For the dev branch, I have no roadmap currently, so I am not sure what features I am going to develop next actually.