Django OTP (One Time Password)
Project description
Django otp provider
- OTP
- Transport: SMS or EMAIL
- Async (celery)
- Custom SMS providers
Requirements
- Python >= 3.0
- Django >= 2.0
- Celery
- PyJWT
Schema
pip install django-otp-provider
- Create your custom class extends from
BaseTransport
and implementsend_code
method - In settings.py:
OTP_PROVIDER = {
'TRANSPORT_TYPE': "SMS", # EMAIL/SMS
'TRANSPORT_CLASS': 'path.to.your.provider',
'CELERY': 'path.to.your.celery.file' # Send code async
}
- Then, in your code you may to use:
generate_otp
- to generate code and send itverify_otp
- to verify payload from user
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for django-otp-provider-1.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | cd9eac07b2426505a844df9414635681250fea281f0de0700d3b3718ca638f72 |
|
MD5 | 378f26cd6b90b6e594324cc04be216e7 |
|
BLAKE2b-256 | e5378923c29635bacc91c92863c00affb0b9094cb86c9ebd2923e723c6bd6556 |
Close
Hashes for django_otp_provider-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a272815d584acd5cb5a03bf2fb80fdafcf0f9cde0ac416789e2d0f0a6840460d |
|
MD5 | e405cd91f2c56199da33e011f3a4d4cb |
|
BLAKE2b-256 | b15e472e2a06a8f22fcfc763ebc4b52560e447dd7ad28dacf70438d1b700f426 |