UNPKG

studiocms

Version:

Astro Native CMS for AstroDB. Built from the ground up by the Astro community.

16 lines (15 loc) 408 B
import { StudioCMSRoutes } from "studiocms:lib"; import { oAuthButtons } from "studiocms:plugins/auth/providers"; const providerData = oAuthButtons.map( ({ enabled, image, label, safeName }) => ({ enabled, href: StudioCMSRoutes.authLinks.oAuthIndex(safeName), label, image }) ); const showOAuth = providerData.some((provider) => provider.enabled); export { providerData, showOAuth };