Skip to main content

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

  1. pip install django-otp-provider
  2. Create your custom class extends from BaseTransport and implement send_code method
  3. 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
}
  1. Then, in your code you may to use:
  • generate_otp - to generate code and send it
  • verify_otp - to verify payload from user

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-otp-provider-1.0.2.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

django_otp_provider-1.0.2-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

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

Hashes for django-otp-provider-1.0.2.tar.gz
Algorithm Hash digest
SHA256 5339888f7a55f37ec3098a67b4725a3851302d7210eda5e3c087d65652e1ae7c
MD5 c7681155e4ecb1f1d75388bbc78c18d7
BLAKE2b-256 52d4f96f920b26a56e300b74914c6a28d1a355ad9fba112f26e7629d10d4ece9

See more details on using hashes here.

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

Hashes for django_otp_provider-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 bfe4a64fcd9869b06c13b992a6628814b792c14fa80881d9275d09a54dc080f7
MD5 5d1984bf85d92b3e1d09ea19b298a62a
BLAKE2b-256 4f830445139218a7f5f7069a472d6afb6401d6e367834b67a4943d35806da7c7

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page