@@ -12,45 +12,45 @@ django-phone-verify
1212 :alt: License
1313
1414.. image :: https://static.pepy.tech/badge/django-phone-verify?period=total&units=international_system&left_color=black&right_color=darkgreen&left_text=Downloads
15- :target: https://pepy.tech/project/django-phone-verify
15+ :target: https://pepy.tech/project/django-phone-verify
1616
1717.. image :: https://img.shields.io/badge/Made%20with-Python-1f425f.svg
18- :target: https://www.python.org/
18+ :target: https://www.python.org/
1919
2020.. image :: https://img.shields.io/badge/Maintained%3F-yes-green.svg
21- :target: https://GitHub.com/CuriousLearner/django-phone-verify/graphs/commit-activity
21+ :target: https://GitHub.com/CuriousLearner/django-phone-verify/graphs/commit-activity
2222
2323.. image :: https://badge.fury.io/py/django-phone-verify.svg
24- :target: https://pypi.python.org/pypi/django-phone-verify/
24+ :target: https://pypi.python.org/pypi/django-phone-verify/
2525
2626.. image :: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square
27- :target: http://makeapullrequest.com
28-
27+ :target: http://makeapullrequest.com
2928
30- A Django app to support phone number verification using the security code sent via SMS.
3129
32- Salient Features
33- ----------------
30+ `` django-phone-verify `` is a Django app that enables simple phone number verification using a security code sent via SMS.
31+ It supports Twilio and Nexmo (Vonage) out of the box and is fully customizable to suit your backend needs.
3432
35- - Let's devs verify phone numbers via SMS.
36- - Extensibility to provide tokens with varying lengths.
37- - Comes with Twilio and Nexmo already integrated.
38- - Set expiration time on tokens.
39- - Provides an interface for writing custom SMS sending backend for easy extensibility.
40- - Does not mess up with existing ``AUTH_USER_MODEL `` at all.
41- - Can be used for several potential use-cases, and not just auth.
42- - Provides ready endpoints for sending SMS and verification (See `api_endpoints.rst `_).
33+ Features
34+ --------
4335
44- .. _api_endpoints.rst : https://github.com/CuriousLearner/django-phone-verify/blob/master/phone_verify/docs/api_endpoints.rst
36+ - 🔐 Verify phone numbers using SMS security codes
37+ - 🔧 Supports custom token length and expiration time
38+ - 🔄 Built-in support for Twilio and Nexmo (Vonage)
39+ - 🧩 Easily extensible via pluggable backends
40+ - ✅ Doesn't interfere with your existing ``AUTH_USER_MODEL ``
41+ - 🚀 Ready-to-use API endpoints via Django REST Framework
42+ - 🛠 Can be used for multiple flows like signup, 2FA, marketing opt-in, etc.
4543
4644Installation
4745------------
4846
47+ Install the package with all supported backends:
48+
4949.. code-block :: shell
5050
5151 pip install django-phone-verify[all]
5252
53- You also have option to install only the required dependencies for Twilio or Nexmo :
53+ Or install with just the backend you need :
5454
5555.. code-block :: shell
5656
@@ -60,27 +60,22 @@ You also have option to install only the required dependencies for Twilio or Nex
6060 Configuration
6161-------------
6262
63- - Add app to `INSTALLED_APPS `
63+ 1. Add `` phone_verify `` to `` INSTALLED_APPS ``:
6464
6565.. code-block :: python
6666
67- # In settings.py:
68-
69- # Add app to `INSTALLED_APPS`
7067 INSTALLED_APPS = [
7168 ...
7269 " phone_verify" ,
7370 ...
7471 ]
7572
76- - Add settings for Phone Verify as you desire :
73+ 2. Configure `` PHONE_VERIFICATION `` settings :
7774
7875.. code-block :: python
7976
80- # In settings.py
81- # Add settings for phone_verify to work
8277 PHONE_VERIFICATION = {
83- " BACKEND" : " phone_verify.backends.twilio.TwilioBackend" ,
78+ " BACKEND" : " phone_verify.backends.twilio.TwilioBackend" , # or NexmoBackend
8479 " OPTIONS" : {
8580 " SID" : " fake" ,
8681 " SECRET" : " fake" ,
@@ -90,38 +85,53 @@ Configuration
9085 " TOKEN_LENGTH" : 6 ,
9186 " MESSAGE" : " Welcome to {app} ! Please use security code {security_code} to proceed." ,
9287 " APP_NAME" : " Phone Verify" ,
93- " SECURITY_CODE_EXPIRATION_TIME" : 3600 , # In seconds only
94- " VERIFY_SECURITY_CODE_ONLY_ONCE" : False , # If False, then a security code can be used multiple times for verification
88+ " SECURITY_CODE_EXPIRATION_TIME" : 3600 , # in seconds
89+ " VERIFY_SECURITY_CODE_ONLY_ONCE" : False ,
9590 }
9691
92+ **Note: ** To use Nexmo instead of Twilio, change the ``BACKEND `` path to:
93+
94+ .. code-block :: python
95+
96+ " BACKEND" : " phone_verify.backends.nexmo.NexmoBackend"
97+
98+ and in ``OPTIONS ``, use:
99+
100+ .. code-block :: python
101+
102+ " KEY" : " your-nexmo-key" ,
103+ " SECRET" : " your-nexmo-secret"
104+
97105 Usage
98106-----
99107
100- - To explore more about how to use, integrate and leverage the existing functionality of `` Django Phone Verify ``, have a look at ` getting_started.rst `_
108+ To get started using the app and integrating it into your own flow (DRF or non-DRF), check the following documentation:
101109
102- .. _getting_started.rst : https://github.com/CuriousLearner/django-phone-verify/blob/master/docs/getting_started.rst
103-
104- **Note **: ``Django Phone Verify `` also provides ``Nexmo `` as a backend service other than ``Twilio ``. To switch to ``Nexmo ``, replace ``BACKEND `` within your ``PHONE_VERIFICATION `` setting with ``phone_verify.backends.nexmo.NexmoBackend `` and define ``KEY `` within ``OPTIONS `` of ``PHONE_VERIFICATION `` setting, with your Nexmo API key, in place of already available ``SID ``.
110+ - 📘 `Getting Started Guide <https://github.com/CuriousLearner/django-phone-verify/blob/master/docs/getting_started.rst >`_
111+ - 🔌 `Integration Examples <https://github.com/CuriousLearner/django-phone-verify/blob/master/docs/integration.rst >`_
112+ - ⚙️ `Custom Backend Guide <https://github.com/CuriousLearner/django-phone-verify/blob/master/docs/customization.rst >`_
113+ - 📮 `API Endpoints Reference <https://github.com/CuriousLearner/django-phone-verify/blob/master/phone_verify/docs/api_endpoints.rst >`_
105114
106115Compatibility
107116-------------
117+
108118- Python 3.6+
109119- Django 2.1+
110120- Django REST Framework 3.9+
111121
112122Contributing
113123------------
114124
115- No code is bug-free and I'm sure this app will have bugs. If you find any bugs, please create an issue on GitHub.
125+ Found a bug? Want to suggest an improvement or submit a patch?
126+ Pull requests are welcome! 🙌 Please check the `contributing guide <https://github.com/CuriousLearner/django-phone-verify/blob/master/docs/contributing.rst >`_ before you start.
116127
117- Licence
128+ License
118129-------
119130
120- GPLv3
131+ This project is licensed under the ** GPLv3 ** license.
121132
122133Changelog
123134---------
124135
125- See `changelog.rst `_
126-
127- .. _changelog.rst : https://github.com/CuriousLearner/django-phone-verify/blob/master/CHANGELOG.rst
136+ See the full changelog here:
137+ 📄 `CHANGELOG.rst <https://github.com/CuriousLearner/django-phone-verify/blob/master/CHANGELOG.rst >`_
0 commit comments