/*
Copyright (c) 2025 Tethys Plex
This file is part of Veloera.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
import React from 'react';
import { Button, Divider, Icon } from '@douyinfe/semi-ui';
import { IconGithubLogo } from '@douyinfe/semi-icons';
import TelegramLoginButton from 'react-telegram-login';
import {
onGitHubOAuthClicked,
onOIDCClicked,
onLinuxDOOAuthClicked,
onIDCFlareOAuthClicked,
} from '../utils';
import OIDCIcon from '../OIDCIcon.js';
import WeChatIcon from '../WeChatIcon';
import LinuxDoIcon from '../LinuxDoIcon.js';
import IDCFlareIcon from '../IDCFlareIcon.js';
import { useTranslation } from 'react-i18next';
const ThirdPartyAuth = ({
status,
onWeChatLoginClicked,
onTelegramLoginClicked
}) => {
const { t } = useTranslation();
const hasThirdPartyAuth = status.github_oauth ||
status.oidc_enabled ||
status.wechat_login ||
status.telegram_oauth ||
status.linuxdo_oauth ||
status.idcflare_oauth;
if (!hasThirdPartyAuth) {
return null;
}
return (
<>
{t('OR')}