Skip to main content
TgAuth [ Telegram Authentication ]

What is Telegram ?
=========================================================================

Telegram is a messaging app with a focus on speed and security, it’s super-fast, simple and free. You can use Telegram on all your devices at the same time — your messages sync seamlessly across any number of your phones, tablets or computers.
click this link for read more about Telegram. https://telegram.org/faq#q-what-is-telegram-what-do-i-do-here

What is Tgauth ?
============================================================================

Tgauth is a package for authentication and authorization with Telegram Messenger. its provide the Token Based Authentication.

Dependencies
============================================================================

python requests module
Create the Bot in telegram [ username and access token is needed ]

Dependency Package Installation
============================================================================

pip install requests

Demo Project
============================================================================

Click this link : https://tgauth.herokuapp.com/

Installation
============================================================================

From Pypi.

pip install tgauth
easy_install tgauth

From Github :

clone tgauth from githib : https://github.com/renjith-tring/tgauth
How It Works ?
============================================================================

Step by Step workflow

User click the Login With Telegram Button or http:// <site name> /tgauth/ ( eg: http://localhost:8000/tgauth/ )

Redirect to User Web version Telegram Account. ( http://www.awesomescreenshot.com/image/1064358/5a5e0e053c278d1cb88392460f75e7f3 )

Click the start Button in Telegram (
http://www.awesomescreenshot.com/image/1064361/2a3c3549174ab6c717d6e2d67e4f89ff
)
4 . Click the link , it will redirect to the Server and ask for the Enter the OTP password
( http://www.awesomescreenshot.com/image/1064371/2954a708f030bfbc3b620f7cb0bb1d84
http://www.awesomescreenshot.com/image/1064373/a18a22e1a24cfad67b96f52df75d2298
)
5. if user enter valid OTP it will redirect to the success page (
http://www.awesomescreenshot.com/image/1064376/1a3a43ccbd877c6be498702ebae6c58d
)


Configuration
============================================================================

Step 1 :

Template settings:

Download the tglogin.html from github : https://github.com/renjith-tring/tgauth/blob/master/tgauth/templates/tglogin.html

Settings.py

TGAUTH_TOKEN = "*****************************************************" // token for your bot

TGAUTH_BOT_USERNAME = "********************************" // username for your bot

TG_AUTH_SITE_URL = "http://127.0.0.1:8000/" // site url like www.example.com

TG_SUCCESS_URL = “ ” // redirect url after authentication , default it will display the dummy page with username after successful authentication

5 . INSTALLED_APPS = (
'tgauth',
)


Url.py

from django.conf.urls import patterns, include, url
from django.views.generic import TemplateView
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',

url(r'^', include('tgauth.urls'))
)


Step 2 :
python manage.py syncdb/migrate

Metadata

Release files for tgauth 1.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tgauth 1.1.1
File Size Uploaded Provenance Actions
tgauth-1.1.1.tar.gz 6.7 kB Without provenance Details for tgauth-1.1.1.tar.gz

Release files / tgauth-1.1.1.tar.gz

Download URL tgauth-1.1.1.tar.gz
Size 6.7 kB
Tags Source
SHA-256 checksum
How to use checksums
4c0b941e69836cabcfb42ac3b0b0c3c0fdf0ecb0b3474463b04567c81a491c73
BLAKE2b-256 checksum
How to use checksums
aaf14bf04a0f47227307469b56a015a645827a2da87e5b98c9aceed6ea6dfdc5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for tgauth 1.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page