Closed velidan closed 2 years ago
You just need to save the the result of TelegramProvider.client.session.save();
somewhere (it's a string) and then put it inside new StringSession('');
Gush, thank you so much. I've spent a few hours struggling with this silly issue.
Hi. I'm working with the library and trying to use it in the Nest.js framework. I managed to log in as a user and start the app however every time when I change the source code the app should be restarted and in this way, I must enter the phone number/confirmation code every time when it happens. My question is: How can I reuse the auth token to automatically log in the user without constant manual re-authorization? I could save this token in some file whatever however I don't see any method to be able to sign in via it.
Thanks for any help
Here is the code example, not sure if it's useful
The TelegramProvider is a very simple container for the gram.js client