From 0060916109507dcddf20b2a0d5cc6d0b40d501ce Mon Sep 17 00:00:00 2001 From: Prateek Surana Date: Wed, 20 Mar 2024 20:19:31 +0530 Subject: [PATCH] Use login methods API for fetching tenants --- api_spec.yaml | 80 +----------- build/static/js/bundle.js | 2 +- build/static/js/bundle.js.map | 2 +- src/api/tenants/list.ts | 31 ++--- src/api/tenants/login-methods.ts | 64 --------- src/constants.ts | 10 ++ .../createUser/CreatePasswordlessUser.tsx | 2 +- .../createUser/CreateUserDialog.tsx | 123 +++++++----------- src/ui/components/userDetail/userDetail.tsx | 9 +- .../components/userDetail/userDetailForm.tsx | 9 +- src/ui/pages/usersList/UsersList.tsx | 40 ++---- src/utils/index.ts | 11 +- 12 files changed, 106 insertions(+), 277 deletions(-) delete mode 100644 src/api/tenants/login-methods.ts diff --git a/api_spec.yaml b/api_spec.yaml index 99b78736..d73238d3 100644 --- a/api_spec.yaml +++ b/api_spec.yaml @@ -1231,47 +1231,6 @@ paths: type: array items: type: string - /dashboard/api/tenants/list: - get: - tags: - - Multitenancy - summary: Get all tenants created in the core - responses: - 200: - description: Success - content: - application/json: - schema: - type: object - properties: - status: - type: string - default: "OK" - coreConfig: - type: object - tenants: - type: array - items: - type: object - properties: - tenantId: - type: string - emailPassword: - type: object - properties: - enabled: - type: boolean - passwordless: - type: object - properties: - enabled: - type: boolean - - thirdParty: - type: object - properties: - enabled: - type: boolean /dashboard/api/tenants/login-methods: get: tags: @@ -1295,41 +1254,10 @@ paths: properties: tenantId: type: string - emailPassword: - type: object - properties: - enabled: - type: boolean - thirdPartyEmailPassword: - type: object - properties: - enabled: - type: boolean - nullable: true - passwordless: - type: object - properties: - enabled: - type: boolean - contactMethod: - type: string - enum: [PHONE, EMAIL, EMAIL_OR_PHONE] - nullable: true - thirdPartPasswordless: - type: object - properties: - enabled: - type: boolean - contactMethod: - type: string - enum: [PHONE, EMAIL, EMAIL_OR_PHONE] - nullable: true - nullable: true - thirdParty: - type: object - properties: - enabled: - type: boolean + firstFactors: + type: array + items: + type: string /dashboard/api/userroles/roles: get: diff --git a/build/static/js/bundle.js b/build/static/js/bundle.js index b1accc4d..f69ad981 100644 --- a/build/static/js/bundle.js +++ b/build/static/js/bundle.js @@ -1,3 +1,3 @@ /*! For license information please see bundle.js.LICENSE.txt */ -!function(){var e={1694:function(e,t){var n;!function(){"use strict";var r={}.hasOwnProperty;function a(){for(var e=[],t=0;t