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.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3ca6573f6df402984fcee23de07679186d22f1c416546fe6026c25899278b447 |
|
MD5 | 2b1a347e17469fafdff60b985d4bd5c1 |
|
BLAKE2b-256 | a93446e22623dcd36e081af5c6798706c4735f741d2f7e65b9b385a05f63f544 |
Close
Hashes for django_otp_provider-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ae5d5a6ca9e79a6794cfda5d38214e0cee6ca06e9f6745fff3dbc561f96a4195 |
|
MD5 | 0a05069ac0aab1d79dd354d2fc1e6e9b |
|
BLAKE2b-256 | e8a0a7ede7b9f2bb71c3a2f14b85c276220f241a142440ec00f3ae9e0670224d |