mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-25 16:55:59 +03:00
[PR #3646] [MERGED] feat: dynamically load enabled auth providers #4469
Labels
No labels
CodeDay
a11y
browser limited
bug
bug fix
cli
core
critical
design
desktop
discussion
docker
documentation
duplicate
enterprise
feature
feature
fosshack
future
good first issue
hacktoberfest
help wanted
i18n
invalid
major
minor
need information
need testing
not applicable to hoppscotch
not reproducible
pull-request
question
refactor
resolved
sandbox
self-host
spam
stale
testmu
wip
wont fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hoppscotch#4469
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/hoppscotch/hoppscotch/pull/3646
Author: @amk-dev
Created: 12/13/2023
Status: ✅ Merged
Merged: 12/13/2023
Merged by: @AndrewBastin
Base:
release/2023.12.0← Head:feat/conditional-auth-from-api📝 Commits (4)
e1dc726chore: organize auth platform things to platform/auth/auth.platform.tsbab67bdrefactor: remove root v-if on Login.vue2fcff19feat: load enabled auth methods dynamically74464c8chore: load additonalLoginItems and verify if they're enabled📊 Changes
14 files changed (+160 additions, -104 deletions)
View changed files
📝
packages/hoppscotch-common/locales/en.json(+2 -1)📝
packages/hoppscotch-common/src/components/app/ActionHandler.vue(+1 -1)📝
packages/hoppscotch-common/src/components/firebase/Login.vue(+95 -83)📝
packages/hoppscotch-common/src/platform/auth.ts(+6 -0)📝
packages/hoppscotch-selfhost-web/package.json(+2 -1)📝
packages/hoppscotch-selfhost-web/src/main.ts(+1 -1)➕
packages/hoppscotch-selfhost-web/src/platform/auth/auth.api.ts(+30 -0)📝
packages/hoppscotch-selfhost-web/src/platform/auth/auth.platform.ts(+2 -0)📝
packages/hoppscotch-selfhost-web/src/platform/collections/collections.platform.ts(+1 -1)📝
packages/hoppscotch-selfhost-web/src/platform/environments/environments.platform.ts(+1 -1)📝
packages/hoppscotch-selfhost-web/src/platform/history/history.platform.ts(+1 -1)📝
packages/hoppscotch-selfhost-web/src/platform/settings/settings.platform.ts(+1 -1)📝
packages/hoppscotch-selfhost-web/src/platform/tabState/tabState.platform.ts(+1 -1)📝
pnpm-lock.yaml(+16 -12)📄 Description
Fixes HFE-343
Changes
This PR loads the enabled auth providers dynamically from the backend rest endpoint. previously we loaded it from .env files.
Auth platform definitionhas a new fieldgetAllowedAuthProviders. this will be used to retrieve the enabled auth providers.now
additionalLoginItemsdoesnt need platform level filtering. the platform can give the definition for the login item entry. and it will be shown/hidden based on the value fromgetAllowedAuthProviders. eg: in enterprise edition for saml, we do not need to filter based on the env value. we can give the definition anyway and it will be shown/hidden based on the value from the api.Chores
This PR removes the root v-if present on Login.vue, which was making using hooks like 'onMounted' unintuitive.
Renamed 'platform/auth.ts' to 'platform/auth.platform.ts' to organize things a little better.
Note
This Implementation will also introduce small changes to our
central&enterpriserepos.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.