How to save data during authentification

Thanks. I should study more to fully understand your answer, for example the last part isn’t clear for me.
The user in my case doesn’t login with telegram on my site, i would like to let the user do everything only in telegram and click the link. You say to ‘‘store data in the session, such as the Telegram ID’’, in my case what would be the session you are talking about?