diff --git a/taiga/auth/api.py b/taiga/auth/api.py index f2ed0161..2663b3e0 100644 --- a/taiga/auth/api.py +++ b/taiga/auth/api.py @@ -142,6 +142,7 @@ class AuthViewSet(viewsets.ViewSet): login_type = request.DATA.get("type", None) if login_type in auth_plugins: - return auth_plugins[login_type]['login_func'](request) + data = auth_plugins[login_type]['login_func'](request) + return response.Ok(data) raise exc.BadRequest(_("invalid login type")) diff --git a/taiga/auth/services.py b/taiga/auth/services.py index 238f229f..c73dd506 100644 --- a/taiga/auth/services.py +++ b/taiga/auth/services.py @@ -201,7 +201,7 @@ def normal_login_func(request): user = get_and_validate_user(username=username, password=password) data = make_auth_response_data(user) - return response.Ok(data) + return data register_auth_plugin("normal", normal_login_func);