CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
sagemathinc

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: sagemathinc/cocalc
Path: blob/master/src/packages/next/pages/api/v2/auth/requires-token.ts
Views: 687
1
/* api call to see whether or not a token is required for creating an account. */
2
3
import getRequiresToken from "@cocalc/server/auth/tokens/get-requires-token";
4
5
export default async function handle(_req, res) {
6
try {
7
res.json(await getRequiresToken());
8
} catch (err) {
9
res.json({ error: err.message });
10
}
11
}
12
13