def _external_auth_intercept(request, mode):
 if (mode == 'login'):
  return external_auth_login(request)
 elif (mode == 'register'):
  return external_auth_register(request)

def _external_auth_intercept ( request , mode ) : if ( mode == 'login' ) : return external_auth_login ( request ) elif ( mode == 'register' ) : return external_auth_register ( request )
allow external auth to intercept a login/registration request .