Skip to content

Commit

Permalink
settings: add support for time-limited login codes
Browse files Browse the repository at this point in the history
  • Loading branch information
Scott Percival committed Feb 23, 2018
1 parent 31aaee1 commit 79f67ec
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ledger/accounts/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def login_retry(request):

def login_expired(request):
messages.error(request,
"This sign-in link has already been used, or has expired. "
"This sign-in link has expired. "
"Please log in again to generate a new sign-in link.")
return bounce(request)

Expand Down
2 changes: 2 additions & 0 deletions ledger/settings_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@
SOCIAL_AUTH_EMAIL_FORM_URL = '/ledger/'
SOCIAL_AUTH_EMAIL_VALIDATION_FUNCTION = 'ledger.accounts.mail.send_validation'
SOCIAL_AUTH_EMAIL_VALIDATION_URL = '/ledger/validation-sent/'
SOCIAL_AUTH_EMAIL_VALIDATION_ALLOW_REUSE = True
SOCIAL_AUTH_EMAIL_VALIDATION_EXPIRED_THRESHOLD = env('EMAIL_VALIDATION_EXPIRY', 86400)
SOCIAL_AUTH_PASSWORDLESS = True
SOCIAL_AUTH_SESSION_EXPIRATION = env('SESSION_EXPIRATION', False)
SOCIAL_AUTH_MAX_SESSION_LENGTH = env('MAX_SESSION_LENGTH', 1209600) # two weeks
Expand Down
5 changes: 3 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
Django<1.11.0
git+https://github.com/dbca-wa/dpaw-utils.git@0.3a16#egg=dpaw-utils
git+https://github.com/django-oscar/django-oscar.git@17a1f6b#egg=django-oscar
social-auth-app-django==1.2.0
social-auth-core==1.4.0
social-auth-app-django==2.1.0
#social-auth-core==1.7.0
git+https://github.com/scottp-dpaw/social-core.git@email_fix#egg=social-auth-core
coverage==4.3.1
coveralls==1.1
reportlab==3.3.0
Expand Down

0 comments on commit 79f67ec

Please sign in to comment.