Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
sagemathinc
GitHub Repository: sagemathinc/cocalc
Path: blob/master/src/packages/util/auth.ts
1447 views
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
export const MAX_PASSWORD_LENGTH = 64;
21
22