Open-Source API Development Ecosystem • https://hoppscotch.io • Offline, On-Prem & Cloud • Web, Desktop & CLI • Open-Source Alternative to Postman, Insomnia
TypeScript apiapi-clientapi-restapi-testingdeveloper-toolsgraphqlhttphttp-clientpwarestrest-apispatestingtesting-toolstoolsvuevuejswebsocket
feat: add ability for platforms to define custom login selector ui
Andrew Bastine3ad0c9e2e12
diff --git a/packages/hoppscotch-common/src/components/firebase/Login.vue b/packages/hoppscotch-common/src/components/firebase/Login.vueindex cc1eacac9..a0bef338b 100644--- a/packages/hoppscotch-common/src/components/firebase/Login.vue+++ b/packages/hoppscotch-common/src/components/firebase/Login.vue@@ -6,7 +6,11 @@@close="hideModal"><template #body>- <template v-if="isLoadingAllowedAuthProviders">+ <template v-if="platform.auth.customLoginSelectorUI">+ <component :is="platform.auth.customLoginSelectorUI" />+ </template>++ <template v-else-if="isLoadingAllowedAuthProviders"><div class="flex justify-center"><HoppSmartSpinner /></div>diff --git a/packages/hoppscotch-common/src/platform/auth.ts b/packages/hoppscotch-common/src/platform/auth.tsindex 58fe104f4..f5f753242 100644--- a/packages/hoppscotch-common/src/platform/auth.ts+++ b/packages/hoppscotch-common/src/platform/auth.ts@@ -52,6 +52,13 @@ export type LoginItemDef = {}export type AuthPlatformDef = {+ /**+ * Whether this platform shows a custom login selector UI. Used for situations+ * where we don't want to render the traditional UI and want to replace it+ * with something else+ */+ customLoginSelectorUI?: Component+/*** Returns an observable that emits the current user as per the auth implementation.*