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 hashes)

Uploaded Source

Built Distribution

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

Uploaded Python 3

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