Skip to main content

OBytes django application for managing OTP (OneTruePairing) for authentication, registration and changing phone number.

Project description

OBytes Django OTP App

Build & Test pypi license downloads python docs health-check

OTP is a Django app to conduct Web-based one true pairing, for authentication, registration and changing phone number.

Quick start

  1. Install ob_dj_otp latest version pip install ob_dj_otp

  2. Add "ob_dj_otp" to your INSTALLED_APPS setting like this:

   # settings.py
   INSTALLED_APPS = [
        ...
        "ob_dj_otp.core.otp",
   ]
  1. Include the OTP URLs in your project urls.py like this::
    # urls.py
    path("otp/", include("ob_dj_otp.apis.otp.urls")),
  1. Run python manage.py migrate to create the otp models.

Configuration

OTP_FORCE_CODE Force using this code instead of generating random one, by default it's not setted

OTP_RETURN_USAGE Boolean that determine whether you want to usage in the response, by default is False

OTP_TIMEOUT Number of seconds for the code expirations, by default it's 3 minuts

OTP_USER_SERIALIZER For the registration purpuse, you need to specify th path to you user serializer so you can create the user with full data

OTP_AUTH_USAGE_ONLY Boolean that deactivate the registration

OTP_EMAIL_AS_PRIMARY_FIELD Boolean to make email required

OTP_PHONE_NUMBER_AS_PRIMARY_FIELD Boolean to make phone number required

SERIALIZERS_MIXIN Dict contain mixins paths to customize serializers behavior ( see tests for better overview)

Notifications

Since each project need it custom provider, the notification part should be sone on the project level not the package level, and it can be done easely but post_save on OneTruePairing model.

Developer Guide

  1. Clone github repo git clone [url]

  2. pipenv install --dev

  3. pre-commit install

  4. Run unit tests pytest

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

ob-dj-otp-0.0.25.tar.gz (55.2 kB view details)

Uploaded Source

Built Distribution

ob_dj_otp-0.0.25-py3-none-any.whl (18.6 kB view details)

Uploaded Python 3

File details

Details for the file ob-dj-otp-0.0.25.tar.gz.

File metadata

  • Download URL: ob-dj-otp-0.0.25.tar.gz
  • Upload date:
  • Size: 55.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for ob-dj-otp-0.0.25.tar.gz
Algorithm Hash digest
SHA256 9d2971f182c532a7e61bceac418067d60da4d7f8eb9e9f21b98bdaab724f4a77
MD5 2bf598d0b06cfe60de6d57e90e1f06d7
BLAKE2b-256 ded3bdfec501eee8292e3ab9401020e28a34e40928fe4295a325266aec46c13e

See more details on using hashes here.

File details

Details for the file ob_dj_otp-0.0.25-py3-none-any.whl.

File metadata

  • Download URL: ob_dj_otp-0.0.25-py3-none-any.whl
  • Upload date:
  • Size: 18.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for ob_dj_otp-0.0.25-py3-none-any.whl
Algorithm Hash digest
SHA256 fe6f663f8ea917581b7cd1bc0be9fb5009ba9cb1113e494e129c9cda56b2f12f
MD5 72ea8f09f5b44576bb3edd21b4a38f0a
BLAKE2b-256 c93bb7c6a37e2d3a1d8475fce2ebcb395e4086cb957f740afd0f6e75b7b0d43c

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