Metadata-Version: 1.1
Name: django-phone-login
Version: 1.0
Summary: Django Phone Login: Login with OTP
Home-page: https://github.com/gonnamake/django-phone-login
Author: Ray Ch
Author-email: ray@jhink.com
License: BSD License
Description: Django Phone Login
        ==================
        
        This login is basically used to login via OTP using ``phone_number`` as
        the new field instead of using ``email`` or ``username`` as the login.
        
        How does it work?
        -----------------
        
        We use
        `django-sendsms <https://github.com/stefanfoulis/django-sendsms>`__ to
        the phone and OTP and Verify it. This way you can use your favorite SMS
        Service. You can ask the user for ``phone_number`` using Forms as
        authentication and login in any web browser. By sending the OTP. Second,
        you can use ``Django Rest Framework`` and login like how Whatsapp, Viber
        and many login works.
        
        Example.
        ~~~~~~~~
        
        Add the Below ``urls.py``
        
        .. code:: python
        
            urlpatterns = [
                url(r'^otp/', include('phone_login.urls', namespace='phone_login'),),
            ]
        
        Make the following changes in the ``settings.py``
        
        .. code:: python
        
            INSTALLED_APPS += [
                ...  # Make sure to include the default installed apps here.
        
                'phone_login',
                'rest_framework',
                'rest_framework.authtoken',
            ]
        
        
            REST_FRAMEWORK = {
                'DEFAULT_AUTHENTICATION_CLASSES': (
                    'rest_framework.authentication.BasicAuthentication',
                    'rest_framework.authentication.TokenAuthentication',
                )
            }
        
        
            AUTH_USER_MODEL = 'phone_login.CustomUser'
        
            AUTHENTICATION_BACKENDS = [
                'phone_login.backends.phone_backend.PhoneBackend',
                'django.contrib.auth.backends.ModelBackend'
            ]
        
        Development
        -----------
        
        Coming Up...
        
        Requirement
        ===========
        
        -  `Django <https://github.com/django/django>`__
        -  `django-phonenumber-field <https://github.com/stefanfoulis/django-phonenumber-field>`__
        -  `Django Rest
           Framework <https://github.com/tomchristie/django-rest-framework>`__
        
        Customizable Fields in Settings.
        ================================
        
        .. code:: python
        
            PHONE_LOGIN_MINUTES = 10
            PHONE_LOGIN_OTP_LENGTH = 6
            PHONE_LOGIN_OTP_HASH_ALGORITHM = 'sha256'
        
Platform: UNKNOWN
Classifier: Environment :: Web Environment
Classifier: Framework :: Django
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.2
Classifier: Programming Language :: Python :: 3.3
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
