GithubHelp home page GithubHelp logo

isabella232 / django-passwordless-login Goto Github PK

View Code? Open in Web Editor NEW

This project forked from imperialcollegelondon/django-passwordless-login

0.0 0.0 0.0 28 KB

Login to your Django app with a link sent by email.

License: BSD 3-Clause "New" or "Revised" License

Python 91.93% HTML 8.07%

django-passwordless-login's Introduction

django-passwordless-login

Login to your Django app with a link sent by email.

Adding it to your django project

  1. Install django-passwordless-login:
$ pip install https://github.com/ImperialCollegeLondon/django-passwordless-login
  1. Add "passwordless_login.apps.PasswordlessLoginConfig" to INSTALLED_APPS:
INSTALLED_APPS += ["passwordless_login.apps.PasswordlessLoginConfig"]
  1. Write a login template and specify the path in settings, ie:
LOGIN_TEMPLATE_PATH = "app_name/login.html"
  1. Include "passwordless_login/login.html" in the template where users will login:
{% include "passwordless_login/login.html" %}
  1. Include functionality of the login view directly from passwordless_login.views import login, or include the urls from this app into your app's urlpatterns:
include("passwordless_login.urls")

Customisable Settings include:

  • LOGIN_MAX_AGE - A datetime.timedelta of the duration the login link will last (default 30 minutes)
  • LOGIN_ONE_TIME - If the login link can be used one time only (default True)
  • LOGIN_CREATE_NEW_USERS - Boolean for whether or not this login form should create new users or just log in existing ones.
  • LOGIN_EMAIL_CONTENT - The content of the email, should include dynamic/format references to link (required), minutes (equivalent to LOGIN_MAX_AGE), app_name, and contact_email.
  • APP_NAME - used in the default email content
  • LOGIN_CONTACT_EMAIL - used in the default email content
  • DEFAULT_FROM_EMAIL - used in the default email content

For development servers, change the EMAIL_BACKEND setting to allow emails to be printed to the console:

EMAIL_BACKEND = "django.core.mail.backends.console.EmailBackend"

django-passwordless-login's People

Contributors

adriandalessandro avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.