pocketbase/ui/src/providers.js

145 lines
3.6 KiB
JavaScript
Raw Normal View History

2022-11-01 03:17:10 +08:00
import SelfHostedOptions from "@/components/settings/providers/SelfHostedOptions.svelte";
import OIDCOptions from "@/components/settings/providers/OIDCOptions.svelte";
2022-11-01 03:17:10 +08:00
import MicrosoftOptions from "@/components/settings/providers/MicrosoftOptions.svelte";
2023-03-02 05:29:45 +08:00
import AppleOptions from "@/components/settings/providers/AppleOptions.svelte";
2022-11-01 03:17:10 +08:00
2022-09-01 20:49:00 +08:00
// Object list with all supported OAuth2 providers in the format:
// ```
// [ { key, title, logo, optionsComponent?, optionComponentProps? }, ... ]
2022-09-01 20:49:00 +08:00
// ```
2022-11-01 03:17:10 +08:00
//
// The logo images must be placed inside the /public/images/oauth2 directory.
//
2022-11-01 03:17:10 +08:00
// If `optionsComponent` is provided it will receive 2 parameters:
// - `key` - the provider settings key (eg. "gitlabAuth")
// - `config` - the provider settings config that is currently being updated
// - any other prop from optionComponentProps
2023-04-13 20:38:12 +08:00
export default [
{
key: "appleAuth",
2023-03-02 05:29:45 +08:00
title: "Apple",
logo: "apple.svg",
2023-03-02 05:29:45 +08:00
optionsComponent: AppleOptions,
},
2023-04-13 20:38:12 +08:00
{
key: "googleAuth",
2022-09-01 20:49:00 +08:00
title: "Google",
logo: "google.svg",
2022-09-01 20:49:00 +08:00
},
{
key: "microsoftAuth",
title: "Microsoft",
logo: "microsoft.svg",
optionsComponent: MicrosoftOptions,
},
{
key: "yandexAuth",
title: "Yandex",
logo: "yandex.svg",
},
2023-04-13 20:38:12 +08:00
{
key: "facebookAuth",
2022-09-01 20:49:00 +08:00
title: "Facebook",
logo: "facebook.svg",
2022-09-01 20:49:00 +08:00
},
2023-04-13 20:38:12 +08:00
{
key: "instagramAuth",
title: "Instagram",
logo: "instagram.svg",
2022-09-01 20:49:00 +08:00
},
2023-04-13 20:38:12 +08:00
{
key: "githubAuth",
2022-09-01 20:49:00 +08:00
title: "GitHub",
logo: "github.svg",
2022-09-01 20:49:00 +08:00
},
2023-04-13 20:38:12 +08:00
{
key: "gitlabAuth",
2022-11-01 03:17:10 +08:00
title: "GitLab",
logo: "gitlab.svg",
2022-11-01 03:17:10 +08:00
optionsComponent: SelfHostedOptions,
optionsComponentProps: { title: "Self-hosted endpoints (optional)" },
2022-09-01 20:49:00 +08:00
},
2023-04-13 20:38:12 +08:00
{
key: "giteeAuth",
2023-03-02 05:29:45 +08:00
title: "Gitee",
logo: "gitee.svg",
2023-03-02 05:29:45 +08:00
},
2023-04-13 20:38:12 +08:00
{
key: "giteaAuth",
2023-03-02 05:29:45 +08:00
title: "Gitea",
logo: "gitea.svg",
2023-03-02 05:29:45 +08:00
optionsComponent: SelfHostedOptions,
optionsComponentProps: { title: "Self-hosted endpoints (optional)" },
2023-03-02 05:29:45 +08:00
},
2023-04-13 20:38:12 +08:00
{
key: "discordAuth",
2022-09-01 20:49:00 +08:00
title: "Discord",
logo: "discord.svg",
2023-04-13 20:38:12 +08:00
},
{
key: "twitterAuth",
title: "Twitter",
logo: "twitter.svg",
2022-09-01 20:49:00 +08:00
},
2023-04-13 20:38:12 +08:00
{
key: "kakaoAuth",
2023-03-02 05:29:45 +08:00
title: "Kakao",
logo: "kakao.svg",
2022-11-01 03:17:10 +08:00
},
{
key: "vkAuth",
title: "VK",
logo: "vk.svg"
},
2023-04-13 20:38:12 +08:00
{
key: "spotifyAuth",
2022-11-01 23:06:06 +08:00
title: "Spotify",
logo: "spotify.svg",
2022-11-01 23:06:06 +08:00
},
2023-04-13 20:38:12 +08:00
{
key: "twitchAuth",
2022-11-13 20:20:11 +08:00
title: "Twitch",
logo: "twitch.svg",
2022-11-13 20:20:11 +08:00
},
{
key: "patreonAuth",
title: "Patreon (v2)",
logo: "patreon.svg"
},
2023-04-13 20:38:12 +08:00
{
key: "stravaAuth",
title: "Strava",
logo: "strava.svg",
},
2023-04-13 20:38:12 +08:00
{
key: "livechatAuth",
title: "LiveChat",
logo: "livechat.svg",
},
{
key: "mailcowAuth",
title: "mailcow",
logo: "mailcow.svg",
optionsComponent: SelfHostedOptions,
optionsComponentProps: { required: true },
},
2023-04-13 20:38:12 +08:00
{
key: "oidcAuth",
title: "OpenID Connect",
logo: "oidc.svg",
optionsComponent: OIDCOptions,
},
2023-04-13 20:38:12 +08:00
{
key: "oidc2Auth",
title: "(2) OpenID Connect",
logo: "oidc.svg",
optionsComponent: OIDCOptions,
},
2023-04-13 20:38:12 +08:00
{
key: "oidc3Auth",
title: "(3) OpenID Connect",
logo: "oidc.svg",
optionsComponent: OIDCOptions,
},
2023-04-13 20:38:12 +08:00
];