import { getAuthProviders } from '../../services/auth-providers.service.js'

/**
 * GET /api/shared/auth-providers — public, no auth required.
 *
 * Tells the client which auth entry points are wired up server-side. The client uses
 * this to hide Google/Apple buttons when the corresponding OAuth env vars aren't
 * configured (avoids a "press button → mysterious 500" UX).
 */
export const sharedAuthProvidersRoutes = async (app) => {
  app.get('/', async (_request, reply) => {
    return reply.send({ success: true, data: getAuthProviders() })
  })
}
