Skip to main content
Glama

Storyden

by Southclaws
Mozilla Public License 2.0
229
useAuthMethodSettings.ts1.21 kB
import { find } from "lodash"; import { useAccountAuthProviderList } from "src/api/openapi-client/accounts"; import { groupAuthMethods, groupAuthProviders } from "@/lib/auth/utils"; export function useAuthMethodSettings() { const { data, error } = useAccountAuthProviderList(); if (!data) { return { ready: false as const, error: error, }; } const { active, available } = data; const { password, phone, webauthn, oauth } = groupAuthProviders(available); const { password: passwordActive, phone: phoneActive, webauthn: webauthnActive, methods, } = groupAuthMethods(active); // Remove any OAuth providers that are already active const availableOAuth = oauth.filter((v) => { return !find(methods, (m) => m.provider.provider === v.provider); }); const sorted = availableOAuth.sort((a, b) => a.name.localeCompare(b.name)); return { ready: true as const, data: { available: { password, phone, webauthn, oauth: sorted, }, active: { password: passwordActive ?? [], phone: phoneActive ?? [], webauthn: webauthnActive ?? [], methods, }, }, }; }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Southclaws/storyden'

If you have feedback or need assistance with the MCP directory API, please join our Discord server