Skip to content

k4ml/gramlogin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Intro

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.

Quickstart

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

License: MIT

Further Reading

About

POC django app login with telegram

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published