From f4cb7e71fa5b35de6d744bf73e8b5c48d697627f Mon Sep 17 00:00:00 2001 From: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com> Date: Fri, 10 Nov 2023 13:45:00 +0100 Subject: [PATCH] Cherry-picked c03df2b74ed120246768d1d8803a99612e4386f3 into v13/dev --- .../src/context/auth.repository.ts | 23 ------------------- 1 file changed, 23 deletions(-) diff --git a/src/Umbraco.Web.UI.Login/src/context/auth.repository.ts b/src/Umbraco.Web.UI.Login/src/context/auth.repository.ts index 75ab8bb496..24c1cfe015 100644 --- a/src/Umbraco.Web.UI.Login/src/context/auth.repository.ts +++ b/src/Umbraco.Web.UI.Login/src/context/auth.repository.ts @@ -34,9 +34,6 @@ export class UmbAuthRepository { return responseData; } - // Additionally authenticate with the Management API - await this.#managementApiLogin(data.username, data.password); - try { const text = await response.text(); if (text) { @@ -275,24 +272,4 @@ export class UmbAuthRepository { return text; } - - async #managementApiLogin(username: string, password: string) { - try { - const authURLManagementApi = 'management/api/v1/security/back-office/login'; - const requestManagementApi = new Request(authURLManagementApi, { - method: 'POST', - body: JSON.stringify({ - username, - password, - }), - headers: { - 'Content-Type': 'application/json', - }, - }); - - return await fetch(requestManagementApi); - } catch (error) { - console.error('Failed to authenticate with the Management API:', error); - } - } }