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.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5339888f7a55f37ec3098a67b4725a3851302d7210eda5e3c087d65652e1ae7c |
|
MD5 | c7681155e4ecb1f1d75388bbc78c18d7 |
|
BLAKE2b-256 | 52d4f96f920b26a56e300b74914c6a28d1a355ad9fba112f26e7629d10d4ece9 |
Close
Hashes for django_otp_provider-1.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bfe4a64fcd9869b06c13b992a6628814b792c14fa80881d9275d09a54dc080f7 |
|
MD5 | 5d1984bf85d92b3e1d09ea19b298a62a |
|
BLAKE2b-256 | 4f830445139218a7f5f7069a472d6afb6401d6e367834b67a4943d35806da7c7 |