Skip to content

Commit

Permalink
set_unusable_password()
Browse files Browse the repository at this point in the history
  • Loading branch information
Dylan Gonzales authored and Dylan Gonzales committed Mar 23, 2020
1 parent 17c6ade commit 8457729
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions django_saml2_auth/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from django.conf import settings
from django.contrib.auth.models import Group
from django.contrib.auth.decorators import login_required
from django.contrib.auth import login, logout, get_user_model, set_unusable_password
from django.contrib.auth import login, logout, get_user_model
from django.shortcuts import render
from django.views.decorators.csrf import csrf_exempt
from django.template import TemplateDoesNotExist
Expand Down Expand Up @@ -214,8 +214,8 @@ def acs(r):
if target_user.is_active:
logger.debug('trying to authenticate')
# Authenticate the user
target_user.set_unusable_password()
target_user = PasswordlessAuthBackend(username=user_name)
target_user = set_unusable_password()
login(r, target_user)
return redirect(reverse('lead_creator_dashboard'))
else:
Expand Down

0 comments on commit 8457729

Please sign in to comment.