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
File details
Details for the file django-otp-provider-1.0.2.tar.gz
.
File metadata
- Download URL: django-otp-provider-1.0.2.tar.gz
- Upload date:
- Size: 5.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.5.0 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5339888f7a55f37ec3098a67b4725a3851302d7210eda5e3c087d65652e1ae7c |
|
MD5 | c7681155e4ecb1f1d75388bbc78c18d7 |
|
BLAKE2b-256 | 52d4f96f920b26a56e300b74914c6a28d1a355ad9fba112f26e7629d10d4ece9 |
File details
Details for the file django_otp_provider-1.0.2-py3-none-any.whl
.
File metadata
- Download URL: django_otp_provider-1.0.2-py3-none-any.whl
- Upload date:
- Size: 7.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.5.0 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bfe4a64fcd9869b06c13b992a6628814b792c14fa80881d9275d09a54dc080f7 |
|
MD5 | 5d1984bf85d92b3e1d09ea19b298a62a |
|
BLAKE2b-256 | 4f830445139218a7f5f7069a472d6afb6401d6e367834b67a4943d35806da7c7 |