1/* 2 * This file is part of CoCalc: Copyright © 2022 Sagemath, Inc. 3 * License: MS-RSL – see LICENSE.md for details 4 */ 5 6/* api call to get the supported SSO strategies, and additional metadata (e.g., 7icons) that make them easier to work with. 8 9Returns array Strategy[], where Strategy is as defined in 10 11 @cocalc/database/settings/get-sso-strategies 12 13or {error:message} if something goes wrong. 14*/ 15 16import getStrategies from "@cocalc/database/settings/get-sso-strategies"; 17 18export default async function handle(_req, res) { 19 try { 20 res.json(await getStrategies()); 21 } catch (err) { 22 res.json({ error: err.message }); 23 } 24} 25 26