Skip to main content

A Django application that provides a custom User model where the username is the email address.

Project description

Django Rapyd ModernAuth

This package provides a custom User model where the username is the email address.

Inspiration

Users today expect to use their email address as the username during authentication. This works well because:

  • Users already know their email addresses by heart.
  • Since email addresses are unique, users don't need to remember yet another item when either signing up or logging into web applications. IMHO this is a significant factor that plays a vital role in user adoption.
  • This is a time tested model and many web applications today follow this.

However, Django's default approach for authentication requires a user provide both a username and an email address during sign up and then just use the username during login.

Usage

Note: Django recommends you do this right at the beginning of the project. Making this change mid-project becomes significantly harder.

Install the package with:

pip install django-rapyd-modernauth

Add modernauth to INSTALLED_APPS.

INSTALLED_APPS = [
..
..
"modernauth"
]

Set modernauth.User as the AUTH_USER_MODEL.

AUTH_USER_MODEL = "modernauth.User"

Create models with:

./manage.py migrate

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_rapyd_modernauth-0.0.5.tar.gz (10.5 kB view details)

Uploaded Source

Built Distribution

django_rapyd_modernauth-0.0.5-py3-none-any.whl (13.9 kB view details)

Uploaded Python 3

File details

Details for the file django_rapyd_modernauth-0.0.5.tar.gz.

File metadata

File hashes

Hashes for django_rapyd_modernauth-0.0.5.tar.gz
Algorithm Hash digest
SHA256 c8722de1c03c7f616bf3147b697f5f02dca5f54cfce9c8108a520769573e536c
MD5 8f6ad52ac7e751f7ed384722c64894d4
BLAKE2b-256 9dbaaafb8bde1e8d7b79a4c359850c14a7a901da26268149f9bad1ec833ff8be

See more details on using hashes here.

File details

Details for the file django_rapyd_modernauth-0.0.5-py3-none-any.whl.

File metadata

File hashes

Hashes for django_rapyd_modernauth-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 0a85115291cf974b4ab051d83ef2e91c6e4f637771e7735f67a557c23e57c553
MD5 ed5d0f1865e934a16eac0f63b4496f86
BLAKE2b-256 b172b1af9c79f2273fb011455adf6482fba5dc987323218148246a95a4f4db31

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