auth.py: Add confirmation handlers for signup.

These handlers will kick into action when is_signup is False. In case
the account exists, the user will be logged in, otherwise, user will
be asked if they want to proceed to registration.
This commit is contained in:
Umair Khan
2017-04-20 11:25:15 +05:00
committed by Tim Abbott
parent 11426a2cec
commit d56db0a3b4
4 changed files with 323 additions and 33 deletions

View File

@@ -85,7 +85,7 @@ def redirect_to_subdomain_login_url():
def login_or_register_remote_user(request, remote_username, user_profile, full_name='',
invalid_subdomain=False, mobile_flow_otp=None,
is_signup=False):
# type: (HttpRequest, Text, UserProfile, Text, bool, Optional[str]) -> HttpResponse
# type: (HttpRequest, Text, UserProfile, Text, bool, Optional[str], bool) -> HttpResponse
if invalid_subdomain:
# Show login page with an error message
return redirect_to_subdomain_login_url()