Skip to main content

Django User model without password field

Project description

Installation

$ [sudo] pip install django-passwordless-user

Pros

  • 3rd party/social authentication without password

Examples

settings.py

AUTH_USER_MODEL = 'users.User'

users/modes.py

from django.db import models
from django_passwordless_user.models import AbstractBaseUser

class Token(models.Model):
    token = models.TextField()

class User(AbstractBaseUser):
    login = models.TextField(unique=True)

    USERNAME_FIELD = 'login'

    class Meta:
        db_table = 'users_user'

    def get_salted_hmac_value(self):
        token = Token.objects.get(pk=self.pk)
        return token

readme42.com

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-passwordless-user-2020.7.2.tar.gz (2.0 kB view hashes)

Uploaded Source

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