This is a POC Django app using Telegram for authentication. The idea is that, to login to the django site, you send a message to a bot which running as webhook in the django app. Upon receiving the message, the bot will create new user using Telegram username. The bot will then return a special url that user should open in order to login.
Clone this repo and then:-
cd gramlogin
heroku create
heroku config:set BOT_TOKEN=<Your telegram bot token> BOT_WHTOKEN=<secret token for webhook url>
This app now created on heroku. Let set the webhook url:-
python3.6 -mvenv venv
venv/bin/python/pip install -r requirements.txt
venv/bin/python set_webhook.py <heroku url> <telegram-bot-token> <webhook-token>
We can push this to heroku:-
git push heroku master