Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add multitenancy dashboard #144

Merged
merged 118 commits into from
Jul 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
118 commits
Select commit Hold shift + click to select a range
7374068
Add tenant management page
prateek3255 Jan 29, 2024
5c36ae1
Fix icons
prateek3255 Jan 29, 2024
6747f52
Fetch tenants on load
prateek3255 Jan 30, 2024
b29de4a
Add login methods for tenants
prateek3255 Jan 30, 2024
6fe8608
Add search input component
prateek3255 Jan 30, 2024
7f743be
Integrate search component
prateek3255 Jan 31, 2024
64cf119
Add tenants not found state
prateek3255 Jan 31, 2024
0caedaf
Update changelog
prateek3255 Jan 31, 2024
e5ed207
Add create new tenant flow
prateek3255 Feb 1, 2024
f9e2b88
Change TenantManagement component to use arrow function
prateek3255 Feb 1, 2024
4166fdf
Handle other errors when creating tenant
prateek3255 Feb 2, 2024
735183d
Handle tenant row click
prateek3255 Feb 1, 2024
8a092ad
Add get tenant info API
prateek3255 Feb 2, 2024
71dd0b5
Fetch tenant details and handle loading and error states
prateek3255 Feb 2, 2024
c75a56f
Add tenant detail header
prateek3255 Feb 2, 2024
7a887f5
Add core config section
prateek3255 Feb 5, 2024
71eeffe
Add initial core config section
prateek3255 Feb 6, 2024
da2d135
Add toggle component
prateek3255 Feb 8, 2024
8226c75
Finish core config UI
prateek3255 Feb 8, 2024
90f466d
Wrap up the core config section
prateek3255 Feb 9, 2024
868d186
Add first and secondary factors section UI
prateek3255 Feb 12, 2024
a42b115
Integrate adding core config
prateek3255 Feb 12, 2024
1476b29
Handle property delete
prateek3255 Feb 13, 2024
26d627c
Handle saving config properties
prateek3255 Feb 13, 2024
5a0694a
Fetch core config from the API
prateek3255 Feb 14, 2024
e4c8fb3
Integrate MFA
prateek3255 Feb 15, 2024
d6dc504
Integrate see users button
prateek3255 Feb 16, 2024
dae06c0
Make details page responsive
prateek3255 Feb 16, 2024
aeddf63
Add warning about MFA recipe
prateek3255 Feb 16, 2024
8cb4465
Handle delete tenant
prateek3255 Feb 16, 2024
13c8b06
Add third party section
prateek3255 Feb 19, 2024
a1a9d37
Add third party provider listing section
prateek3255 Feb 21, 2024
447ad85
'Add third-party provider configuration UI
prateek3255 Feb 26, 2024
0c7aa98
Add client configuration collapsible section
prateek3255 Feb 27, 2024
51ea4bf
Improve toggle focus visuals
prateek3255 Feb 27, 2024
30037d2
Update third party UI to work with custom fields
prateek3255 Feb 28, 2024
b4a4ce7
Handle crud operations for built in providers
prateek3255 Feb 28, 2024
eadaabf
Use core APIs for core config list
prateek3255 Feb 29, 2024
3cc1746
Build custom provider UI
prateek3255 Feb 29, 2024
e17aeb9
Fix types
prateek3255 Mar 1, 2024
0240d1f
Refactor field inputs
prateek3255 Mar 4, 2024
80f965d
Integrate custom providers section
prateek3255 Mar 5, 2024
81430ec
Add prefix to third party field
prateek3255 Mar 6, 2024
c30dcf9
Add additional scopes to the client config
prateek3255 Mar 8, 2024
024d90a
Handle merging providers based on different providers in core and static
prateek3255 Mar 13, 2024
b4ffa8c
Handle no login methods state
prateek3255 Mar 14, 2024
ba74d6f
Show relevant errors when no login methods added
prateek3255 Mar 18, 2024
4ed6c2f
Add dialog to prompt adding providers when none added yet.
prateek3255 Mar 18, 2024
ce763f3
Add SAML provider configuration handling
prateek3255 Mar 19, 2024
6e816c2
Refactor tenant API routes for core config list eg/ fetching URL chan…
prateek3255 Mar 20, 2024
bfdbbd5
Merge remote-tracking branch 'origin/master' into add-third-party-sec…
prateek3255 Apr 2, 2024
107a67d
Remove the method to read initialized recipe from window
prateek3255 Apr 3, 2024
3283124
Show relevant errors directly from core when creating tenant
prateek3255 Apr 4, 2024
dee3519
Use tenant id from path
prateek3255 Apr 4, 2024
dca3e97
Add different error states for login methods
prateek3255 Apr 5, 2024
4030412
Move search state up the tree
prateek3255 Apr 6, 2024
6c55596
Update tenant detail and login methods API and fix type errors
prateek3255 Apr 7, 2024
f4f9e90
Integrate core config section
prateek3255 Apr 9, 2024
c9b5278
WIP: Third party provider integration
prateek3255 Apr 9, 2024
1c78b79
Merge provider forms
prateek3255 Apr 9, 2024
e9ba313
Finish third party integration
prateek3255 Apr 10, 2024
d2dc45b
Update third party API
prateek3255 Apr 10, 2024
16f2e3e
Move providers list to dialog
prateek3255 Apr 10, 2024
d7b17fd
API updates
prateek3255 Apr 10, 2024
08f2b7f
Fixes for provider form
prateek3255 Apr 10, 2024
7105579
Ask for tenantId when deleting tenant
prateek3255 Apr 10, 2024
323d8ba
Add edit plugin property modal
prateek3255 Apr 11, 2024
2c0dd6f
Use name instead of id for third party providers section
prateek3255 Apr 11, 2024
90e1323
Remove mocks for third party APIs
prateek3255 Apr 11, 2024
512504c
Move require email outside userInfoMap
prateek3255 Apr 11, 2024
6a18665
Login methods section add API call to individual toggle
prateek3255 Apr 11, 2024
5367055
Update example and copy for core config
prateek3255 Apr 11, 2024
a103a7e
Update core config API
prateek3255 Apr 11, 2024
47645b1
Fix styling issues and removed unused components
prateek3255 Apr 12, 2024
5ae86e9
Revert server file
prateek3255 Apr 12, 2024
e6c0530
Revert error on success in login methods
prateek3255 Apr 12, 2024
0000525
fix: test cases for tenant management dashboard
sattvikc Apr 12, 2024
35fca6e
Update core config UI
prateek3255 Apr 12, 2024
81c9571
Fix responsiveness
prateek3255 Apr 12, 2024
0623e46
Use svg for all third party provider icons
prateek3255 Apr 12, 2024
e099b9a
Review updates
prateek3255 Apr 12, 2024
77b151f
New UI for third party id suffix
prateek3255 Apr 12, 2024
ef65a20
Login methods review updates and minor CSS fixes
prateek3255 Apr 13, 2024
06a7dbc
fix: core config
sattvikc May 14, 2024
5815121
fix: as per updated apis
sattvikc May 15, 2024
9473574
fix: multiline input for apple private key
sattvikc May 22, 2024
c07b72d
fix: services cleanup
sattvikc May 22, 2024
0cb6270
fix: create tenant
sattvikc May 22, 2024
a1351fa
fix: create tenant
sattvikc May 22, 2024
191771e
fix: error messages
sattvikc May 22, 2024
7f5803d
fix: pr comments
sattvikc May 22, 2024
cf8d457
fix: third party id prefix
sattvikc May 23, 2024
d4774bf
fix: pr comments
sattvikc May 23, 2024
6ff552e
fix: pr comments
sattvikc May 23, 2024
a23e555
fix: error message
sattvikc May 24, 2024
70b00a9
💇‍♂️ Remove body scroll from dialog, by default
ohansFavour May 24, 2024
bfa4a4b
💇‍♀️ Remove overflow from dashboard layout
ohansFavour May 24, 2024
b3a04d0
🛠 Close modal when overlay is clicked, by default
ohansFavour May 24, 2024
f7ddc2f
💇‍♀️ Fix layout style
ohansFavour May 24, 2024
7696da8
💇‍♀️ Fix tenant page responsiveness
ohansFavour May 24, 2024
1929b8c
💇‍♀️ Fix third-party login responsiveness
ohansFavour May 26, 2024
7865242
📝 Update changelog
ohansFavour May 26, 2024
d9ee213
fix: remove msg
sattvikc Jul 5, 2024
5831fee
Merge branch 'feat/add-multitenancy-dashboard' into fix/UI-issues
sattvikc Jul 5, 2024
a519988
fix: minor fixes
sattvikc Jul 5, 2024
4560cbf
Merge pull request #147 from supertokens/fix/UI-issues
sattvikc Jul 5, 2024
4a82f36
fix: version update
sattvikc Jul 10, 2024
8212485
Merge branch '0.12' into feat/add-multitenancy-dashboard
sattvikc Jul 10, 2024
d532b08
fix: provider form
sattvikc Jul 10, 2024
77c527a
fix: name dropdown for boxy saml
sattvikc Jul 11, 2024
9a07389
fix: remove openid
sattvikc Jul 11, 2024
5765e84
fix: apple
sattvikc Jul 11, 2024
cc0f07f
fix: name compulsory for custom provider
sattvikc Jul 11, 2024
eb5f184
fix: mfa override error
sattvikc Jul 12, 2024
8e5804e
fix: Convert 'select" element to 'input' element (#148)
ohansFavour Jul 15, 2024
61a67e7
fix: type
sattvikc Jul 15, 2024
1bc6699
fix: scope normalisation
sattvikc Jul 15, 2024
8da73df
fix: minor
sattvikc Jul 15, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,12 +121,73 @@
- [ ] Test user-defined custom email and phoneNumber validators to ensure they are working properly.
- [ ] Test AccountLinking by creating an `emailpassword` and `passwordless` user with the same email and make sure that the accounts are linked.
- [ ] User details

- [ ] Can edit email of non third party login method if there is only 1 login method for the user
- [ ] Can edit email of non third party login method if there are >= 2 login methods for the user
- [ ] Deleting a non primary login method for a user only deletes that login method, and not the whole user
- [ ] Deleting a primary login method for a user deletes only that primary login method and not the user
- [ ] Deleting a user deletes all the login methods for that user as well

- [ ] Tenant Management
- [ ] Tenant Listing page
- [ ] There should be only one tenant by default (public) and the login methods should be same as what is initialised in the SDK
- [ ] Initialise only thirdparty and emailpassword recipe and check if only emailpassword and thirdparty is shown for the public tenant
- [ ] Initialise passwordless with different contact methods and flow type and ensure the factor toggles are reflected as per what is initialised
- [ ] Create a new tenant
- [ ] Should display an error message if multitenancy license is not added to the core
- [ ] Should be able to create tenant once the multitenancy license is added to the core
- [ ] Should not be able to create tenants with some stop words like `recipe`, `config`, `hello`, `appid-t1`
- [ ] Should not be able to create tenants with special characters in the name
- [ ] When creating a tenant with capital letters, it should automatically convert to lowercase once the tenant is created
- [ ] For newly created tenant, no recipes should be enabled by default
- [ ] Creating more than 10 tenants should show pagination
- [ ] Creating existing tenant id should show an error
- [ ] Tenant search and pagination
- [ ] Should be able to search for tenants
- [ ] Tenant search should be case insensitive
- [ ] Tenant search should match if the sub-string is in the middle of the tenant name
- [ ] When tenant search matches with more than 10 tenants, pagination should still be active
- [ ] When there is a search term, click on a tenant and then come back to the tenant listing page. The search term should remain.
- [ ] Tenant details
- [ ] The whole tenant row must be clickable and on click should take to tenant details page
- [ ] Create some users for the tenant and ensure user count matches
- [ ] See users button must take you to users listing page with the tenant selected on a new window
- [ ] Should see a warning when no login methods are enabled
- [ ] Enabled login methods
- [ ] Should be able to toggle only login methods based on the initialised recipes
- [ ] if only thirdparty and emailpassword recipe is initialised, should not be able to turn on any of the passwordless login methods (otp-phone, otp-email, etc)
- [ ] if passwordless is initialised with contact method email only, should not be able to turn on otp-phone, link-phone
- [ ] should be able to turn off all login methods
- [ ] Secondary login methods
- [ ] With mfa not initialised, should not be able to turn on any secondary login methods
- [ ] Should be able to toggle only login methods based on initialised recipes
- [ ] If passwordless is not initialised, should not be able to turn on otp-phone
- [ ] If totp is not initialised, should not be able to turn on totp
- [ ] If passwordless is initialised with contact method email only, should not be able to turn on otp-phone
- [ ] Once all the recipes are initialised, should be able to turn on/off all the secondary login methods
- [ ] Social/Enterprise logins
- [ ] This section should not be visible if thirdparty login method is turned off
- [ ] This section should be visible if thirdparty login method is turned on
- [ ] With static provider list
- [ ] The static provider list should show up by default for all the tenants
- [ ] Should be able to delete third party providers from static list
- [ ] When deleting the last one, thirdparty should get disabled
- [ ] When there are no providers for a tenant, when turning on thirdparty login method, a popup to add a third party provider should be shown
- [ ] For creating Enterprise providers, there should be an additional step where the user has to provide directoryId or okta domain, etc. When a valid value is entered, the OIDC endpoint and other endpoints should be populated automatically.
- [ ] If directoryId or okta domain is invalid, appropriate error message should be shown
- [ ] In the thirdparty form, all the fields should be editable and persist correctly. Change every field, save and then go into edit mode again and check if the change has been persisted correctly.
- [ ] Should be able to add all built-in providers. When adding provider, check relavant fields are already populated, like OIDC endpoint, authorization endpoint, token endpoint, etc.
- [ ] Clients list
- [ ] Should be able to add / remove clients in any order
- [ ] Client Type should be required whenever there are more than 1 clients
- [ ] Minimum one client should be required
- [ ] Should not be able to save when required fields are not filled
- [ ] Fake email generation
- [ ] Should ask for fake email generation when `Sometimes` option is selected for `How often does the provider return email?`
- [ ] Should not ask for fake email generation when `Always` option is selected for `How often does the provider return email?`
- [ ] Should not ask for fake email generation when `Never` option is selected for `How often does the provider return email?`
- [ ] Select never option and save the provider. Come back into edit mode of this, we should see that the option is `Sometimes` and the fake email generation is set to true

## Documentation changes

(If relevant, please create a PR in our [docs repo](https://github.com/supertokens/docs), or create a checklist here highlighting the necessary changes)
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [unreleased]

## [0.12.0]

- Adds Multitenancy support to the dashboard

## [0.11.2] - 2024-05-23

- Fixes link to swaggerhub for create new user popup
Expand Down
15 changes: 15 additions & 0 deletions build/asset-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"static/js/787.bundle.js": "/static/js/787.bundle.js",
"static/media/auth-background.png": "/static/media/auth-background.png",
"static/media/auth-background-portrait.png": "/static/media/auth-background-portrait.png",
"static/media/provider-bitbucket.png": "/static/media/provider-bitbucket.png",
"static/media/favicon.ico": "/static/media/favicon.ico",
"static/media/ST_icon_light_theme.svg": "/static/media/ST_icon_light_theme.svg",
"static/media/ST_full_logo_dark_theme.svg": "/static/media/ST_full_logo_dark_theme.svg",
Expand All @@ -13,18 +14,29 @@
"static/media/ST_full_logo_light_theme.svg": "/static/media/ST_full_logo_light_theme.svg",
"static/media/ST_icon_dark_theme.svg": "/static/media/ST_icon_dark_theme.svg",
"static/media/auth-method.svg": "/static/media/auth-method.svg",
"static/media/provider-okta.svg": "/static/media/provider-okta.svg",
"static/media/no-tenants.svg": "/static/media/no-tenants.svg",
"static/media/logo.svg": "/static/media/logo.svg",
"static/media/plus-square.svg": "/static/media/plus-square.svg",
"static/media/roles-and-permissions.svg": "/static/media/roles-and-permissions.svg",
"static/media/no-results.svg": "/static/media/no-results.svg",
"static/media/question-mark.svg": "/static/media/question-mark.svg",
"static/media/help-circle.svg": "/static/media/help-circle.svg",
"static/media/info-icon.svg": "/static/media/info-icon.svg",
"static/media/email.svg": "/static/media/email.svg",
"static/media/user-managment.svg": "/static/media/user-managment.svg",
"static/media/lock.svg": "/static/media/lock.svg",
"static/media/checkmark-green.svg": "/static/media/checkmark-green.svg",
"static/media/plus.svg": "/static/media/plus.svg",
"static/media/green-check.svg": "/static/media/green-check.svg",
"static/media/tenant-management.svg": "/static/media/tenant-management.svg",
"static/media/close-inactive.svg": "/static/media/close-inactive.svg",
"static/media/close-active.svg": "/static/media/close-active.svg",
"static/media/clear.svg": "/static/media/clear.svg",
"static/media/provider-apple.svg": "/static/media/provider-apple.svg",
"static/media/provider-discord.svg": "/static/media/provider-discord.svg",
"static/media/edit-unfilled.svg": "/static/media/edit-unfilled.svg",
"static/media/provider-linkedin.svg": "/static/media/provider-linkedin.svg",
"static/media/search.png": "/static/media/search.png",
"static/media/phone-no.svg": "/static/media/phone-no.svg",
"static/media/provider-google.svg": "/static/media/provider-google.svg",
Expand All @@ -38,6 +50,7 @@
"static/media/edit-login-method.png": "/static/media/edit-login-method.png",
"static/media/mail.svg": "/static/media/mail.svg",
"static/media/lock-opened.svg": "/static/media/lock-opened.svg",
"static/media/provider-twitter.svg": "/static/media/provider-twitter.svg",
"static/media/eye.svg": "/static/media/eye.svg",
"static/media/envelope-green.svg": "/static/media/envelope-green.svg",
"static/media/delete.svg": "/static/media/delete.svg",
Expand All @@ -51,6 +64,7 @@
"static/media/copy.svg": "/static/media/copy.svg",
"static/media/delete-login-method.png": "/static/media/delete-login-method.png",
"static/media/close-icon.svg": "/static/media/close-icon.svg",
"static/media/provider-gitlab.svg": "/static/media/provider-gitlab.svg",
"static/media/edit.svg": "/static/media/edit.svg",
"static/media/right_arrow_icon.svg": "/static/media/right_arrow_icon.svg",
"static/media/trash.svg": "/static/media/trash.svg",
Expand All @@ -65,6 +79,7 @@
"static/media/arrow-down.svg": "/static/media/arrow-down.svg",
"static/media/hamburger-menu.svg": "/static/media/hamburger-menu.svg",
"static/media/provider-facebook.svg": "/static/media/provider-facebook.svg",
"static/media/provider-active-directory.svg": "/static/media/provider-active-directory.svg",
"static/media/Union-yellow.png": "/static/media/Union-yellow.png",
"static/media/Union.png": "/static/media/Union.png",
"static/media/checkmark-yellow.svg": "/static/media/checkmark-yellow.svg",
Expand Down
4 changes: 2 additions & 2 deletions build/static/css/main.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/static/css/main.css.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/static/js/bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/static/js/bundle.js.map

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions build/static/media/close-active.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions build/static/media/close-inactive.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions build/static/media/edit-unfilled.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions build/static/media/help-circle.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions build/static/media/info-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading