Filter on reason also when logging in via sso and picking authtoken

This commit is contained in:
Matthew Jones 2017-03-07 13:54:52 -05:00
parent 90a26de180
commit 2c7dd8497b

View File

@ -50,6 +50,7 @@ class CompleteView(BaseRedirectView):
try:
token = AuthToken.objects.filter(user=request.user,
request_hash=request_hash,
reason='',
expires__gt=now())[0]
token.refresh()
logger.info(smart_text(u"User {} logged in".format(self.request.user.username)))