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/util/auth.ts
Views: 687
1
/*
2
* This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.
3
* License: MS-RSL – see LICENSE.md for details
4
*/
5
6
// Authentication and SSO related utility functions or data shared between all packages
7
8
import { capitalize } from "@cocalc/util/misc";
9
10
export function ssoDispayedName({
11
display,
12
name, // name of strategy
13
}: {
14
display?: string;
15
name?: string;
16
}) {
17
return display ?? (name === "github" ? "GitHub" : capitalize(name));
18
}
19
20