diff --git a/LandingPage/views.py b/LandingPage/views.py index dd4be9f..2a0563e 100644 --- a/LandingPage/views.py +++ b/LandingPage/views.py @@ -50,6 +50,7 @@ class LoginRedirect(View): ).json() req.session['user_id'] = user_info['uuid'] matches = User.objects.filter(user_id=user_info['uuid']) + match = None if not len(matches): user = User( user_id = user_info['uuid'], @@ -57,7 +58,11 @@ class LoginRedirect(View): display_name = user_info['display_name'] ) user.save() + match = user + else: + match = matches[0] req.session['token'] = resp_json['access_token'] + req.session['disp_name'] = match.display_name return HttpResponseRedirect('/') else: return HttpResponse('

Unmatching state tokens


It looks like the request to login wasn\'t started by you. Try going back to the home page and logging in again.

', status=400)