Metadata-Version: 2.1
Name: djaodjin-signup
Version: 0.8.2
Summary: Django app for user authentication
Author-email: The DjaoDjin Team <help@djaodjin.com>
Maintainer-email: The DjaoDjin Team <help@djaodjin.com>
License: BSD-2-Clause
Project-URL: repository, https://github.com/djaodjin/djaodjin-signup
Project-URL: documentation, https://djaodjin-signup.readthedocs.io/
Project-URL: changelog, https://github.com/djaodjin/djaodjin-signup/changelog
Keywords: signup,authentication,frictionless,2fa,mfa,otp,oauth,saml
Classifier: Framework :: Django
Classifier: Environment :: Web Environment
Classifier: Programming Language :: Python
Classifier: License :: OSI Approved :: BSD License
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE.txt
Requires-Dist: boto3 (>=1.4.4)
Requires-Dist: Django (>=1.11)
Requires-Dist: django-fernet-fields (>=0.6)
Requires-Dist: django-phonenumber-field (>=2.4.0)
Requires-Dist: django-recaptcha (>=2.0)
Requires-Dist: djangorestframework (>=3.9)
Requires-Dist: phonenumbers (>=8.12.6)
Requires-Dist: PyJWT (>=1.6.1)
Requires-Dist: pyotp (>=2.8.0)
Requires-Dist: python-dateutil (>=2.2)
Requires-Dist: python3-saml (>=1.2.1)
Requires-Dist: social-auth-app-django (>=4.0.0)
Requires-Dist: social-auth-core (>=4.2.0)
Provides-Extra: ldap
Requires-Dist: python-ldap (>=3.2.0) ; extra == 'ldap'

This code a frictionless signup Django app.

The app will register and login a user with as little as only an email address.

When the user logs out and tries to logs back in with the same email address,
the app will first verify the email address through an activation url send
to the registered email address. Setting the password is deferred to after
the email address has been verified.

If during the first login and/or subsequent login, the email address should
be verified before moving forward (ex: before presenting a payment view),
you should decorate the view with an *active_required* decorator.

This project contains bare bone templates which are compatible with Django
and Jinja2 template engines. To see djaodjin-signup in action as part
of a full-fledged subscription-based session proxy, take a look
at [djaoapp](https://github.com/djaodjin/djaoapp/).


Install
=======

Add the signup urls to your urlpatterns and EmailOrUsernameModelBackend
to the settings AUTHENTICATION_BACKENDS.

    urls.py:

        urlpatterns = ('',
            (r'^api/', include('signup.urls.api')),
            (r'^', include('signup.urls.views')),

        )

    settings.py:

        AUTHENTICATION_BACKENDS = (
            'signup.backends.auth.EmailOrUsernameModelBackend',
            'django.contrib.auth.backends.ModelBackend'

        )

To make the application useable accross a variety of websites, ``signup`` never
sends any e-mails directly. It relies on triggering ``signals`` whenever
a notification must be generated. As a result, to verify a user email address
and activate her account, you will need to implement a listener for the
``user_verification`` signal and send the e-mail from there.

Development
===========

After cloning the repository, create a virtualenv environment, install
the prerequisites, create and load initial data into the database, then
run the testsite webapp.

    $ python -m venv .venv
    $ source .venv/bin/activate
    $ pip install -r testsite/requirements.txt
    $ make vendor-assets-prerequisites
    $ make initdb
    $ python manage.py runserver

    # Browse http://localhost:8000/

Release Notes
=============

Tested with

- **Python:** 3.7, **Django:** 3.2 ([LTS](https://www.djangoproject.com/download/)), **Django Rest Framework:** 3.12
- **Python:** 3.10, **Django:** 4.2 (latest) - see [#55](https://github.com/djaodjin/djaodjin-signup/issues/55)
- **Python:** 2.7, **Django:** 1.11 (legacy) - use testsite/requirements-legacy.txt

0.8.1

  * fixes regression handling auth URLs with extra characters

0.8.0

  * publishes distribution using pyproject.toml
  * enables/disables OTP 2FA through user profile
  * moves API keys to their own page

[previous release notes](changelog)
