/** * Copyright (c) 2023-present Plane Software, Inc. and contributors * SPDX-License-Identifier: AGPL-3.0-only * See the LICENSE file for details. */ import { KeyRound, Mails } from "lucide-react"; // types import type { TCoreInstanceAuthenticationModeKeys, TGetBaseAuthenticationModeProps, TInstanceAuthenticationModes, } from "@plane/types"; // assets import giteaLogo from "@/app/assets/logos/gitea-logo.svg?url"; import githubLightModeImage from "@/app/assets/logos/github-black.png?url"; import githubDarkModeImage from "@/app/assets/logos/github-white.png?url"; import gitlabLogo from "@/app/assets/logos/gitlab-logo.svg?url"; import googleLogo from "@/app/assets/logos/google-logo.svg?url"; // components import { EmailCodesConfiguration } from "@/components/authentication/email-config-switch"; import { GiteaConfiguration } from "@/components/authentication/gitea-config"; import { GithubConfiguration } from "@/components/authentication/github-config"; import { GitlabConfiguration } from "@/components/authentication/gitlab-config"; import { GoogleConfiguration } from "@/components/authentication/google-config"; import { PasswordLoginConfiguration } from "@/components/authentication/password-config-switch"; // Authentication methods export const getCoreAuthenticationModesMap: ( props: TGetBaseAuthenticationModeProps ) => Record = ({ disabled, updateConfig, resolvedTheme, }) => ({ "unique-codes": { key: "unique-codes", name: "Unique codes", description: "Log in or sign up for Plane using codes sent via email. You need to have set up SMTP to use this method.", icon: , config: , enabledConfigKey: "ENABLE_MAGIC_LINK_LOGIN", }, "passwords-login": { key: "passwords-login", name: "Passwords", description: "Allow members to create accounts with passwords and use it with their email addresses to sign in.", icon: , config: , enabledConfigKey: "ENABLE_EMAIL_PASSWORD", }, google: { key: "google", name: "Google", description: "Allow members to log in or sign up for Plane with their Google accounts.", icon: Google Logo, config: , enabledConfigKey: "IS_GOOGLE_ENABLED", }, github: { key: "github", name: "GitHub", description: "Allow members to log in or sign up for Plane with their GitHub accounts.", icon: ( GitHub Logo ), config: , enabledConfigKey: "IS_GITHUB_ENABLED", }, gitlab: { key: "gitlab", name: "GitLab", description: "Allow members to log in or sign up to plane with their GitLab accounts.", icon: GitLab Logo, config: , enabledConfigKey: "IS_GITLAB_ENABLED", }, gitea: { key: "gitea", name: "Gitea", description: "Allow members to log in or sign up to plane with their Gitea accounts.", icon: Gitea Logo, config: , enabledConfigKey: "IS_GITEA_ENABLED", }, });