mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-24 03:57:06 -04:00
refactor: remove dropbox, facebook & twitter login
Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
parent
29bf32b76f
commit
d43da06ec1
15 changed files with 19 additions and 207 deletions
|
@ -24,11 +24,8 @@ export enum GuestAccessLevel {
|
|||
}
|
||||
|
||||
export enum AuthProviderType {
|
||||
DROPBOX = 'dropbox',
|
||||
FACEBOOK = 'facebook',
|
||||
GITHUB = 'github',
|
||||
GOOGLE = 'google',
|
||||
TWITTER = 'twitter',
|
||||
GITLAB = 'gitlab',
|
||||
OAUTH2 = 'oauth2',
|
||||
LDAP = 'ldap',
|
||||
|
@ -43,22 +40,16 @@ export type AuthProviderTypeWithCustomName =
|
|||
| AuthProviderType.SAML
|
||||
|
||||
export type AuthProviderTypeWithoutCustomName =
|
||||
| AuthProviderType.DROPBOX
|
||||
| AuthProviderType.FACEBOOK
|
||||
| AuthProviderType.GITHUB
|
||||
| AuthProviderType.GOOGLE
|
||||
| AuthProviderType.TWITTER
|
||||
| AuthProviderType.LOCAL
|
||||
|
||||
export const authProviderTypeOneClick = [
|
||||
AuthProviderType.DROPBOX,
|
||||
AuthProviderType.FACEBOOK,
|
||||
AuthProviderType.GITHUB,
|
||||
AuthProviderType.GITLAB,
|
||||
AuthProviderType.GOOGLE,
|
||||
AuthProviderType.OAUTH2,
|
||||
AuthProviderType.SAML,
|
||||
AuthProviderType.TWITTER
|
||||
AuthProviderType.SAML
|
||||
]
|
||||
|
||||
export interface AuthProviderWithCustomName {
|
||||
|
|
|
@ -6,14 +6,11 @@
|
|||
import styles from './via-one-click.module.scss'
|
||||
import type { Icon } from 'react-bootstrap-icons'
|
||||
import {
|
||||
Dropbox as IconDropbox,
|
||||
Exclamation as IconExclamation,
|
||||
Facebook as IconFacebook,
|
||||
Github as IconGithub,
|
||||
Google as IconGoogle,
|
||||
People as IconPeople,
|
||||
PersonRolodex as IconPersonRolodex,
|
||||
Twitter as IconTwitter
|
||||
PersonRolodex as IconPersonRolodex
|
||||
} from 'react-bootstrap-icons'
|
||||
import { Logger } from '../../../utils/logger'
|
||||
import type { AuthProvider } from '../../../api/config/types'
|
||||
|
@ -41,20 +38,6 @@ const logger = new Logger('GetOneClickProviderMetadata')
|
|||
*/
|
||||
export const getOneClickProviderMetadata = (provider: AuthProvider): OneClickMetadata => {
|
||||
switch (provider.type) {
|
||||
case AuthProviderType.DROPBOX:
|
||||
return {
|
||||
name: 'Dropbox',
|
||||
icon: IconDropbox,
|
||||
className: styles['btn-social-dropbox'],
|
||||
url: getBackendAuthUrl('dropbox')
|
||||
}
|
||||
case AuthProviderType.FACEBOOK:
|
||||
return {
|
||||
name: 'Facebook',
|
||||
icon: IconFacebook,
|
||||
className: styles['btn-social-facebook'],
|
||||
url: getBackendAuthUrl('facebook')
|
||||
}
|
||||
case AuthProviderType.GITHUB:
|
||||
return {
|
||||
name: 'GitHub',
|
||||
|
@ -90,13 +73,6 @@ export const getOneClickProviderMetadata = (provider: AuthProvider): OneClickMet
|
|||
className: 'btn-success',
|
||||
url: getBackendAuthUrl(provider.identifier)
|
||||
}
|
||||
case AuthProviderType.TWITTER:
|
||||
return {
|
||||
name: 'Twitter',
|
||||
icon: IconTwitter,
|
||||
className: styles['btn-social-twitter'],
|
||||
url: getBackendAuthUrl('twitter')
|
||||
}
|
||||
default:
|
||||
logger.warn('Metadata for one-click-provider does not exist', provider)
|
||||
return {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file)
|
||||
/*!
|
||||
* SPDX-FileCopyrightText: 2023 The HedgeDoc developers (see AUTHORS file)
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
@ -12,14 +12,6 @@
|
|||
}
|
||||
}
|
||||
|
||||
.btn-social-dropbox {
|
||||
@include button(#1087DD);
|
||||
}
|
||||
|
||||
.btn-social-facebook {
|
||||
@include button(#3B5998);
|
||||
}
|
||||
|
||||
.btn-social-github {
|
||||
@include button(#444444);
|
||||
}
|
||||
|
@ -31,7 +23,3 @@
|
|||
.btn-social-google {
|
||||
@include button(#DD4B39);
|
||||
}
|
||||
|
||||
.btn-social-twitter {
|
||||
@include button(#55ACEE);
|
||||
}
|
||||
|
|
|
@ -39,18 +39,9 @@ const initialConfig: FrontendConfig = {
|
|||
{
|
||||
type: AuthProviderType.LOCAL
|
||||
},
|
||||
{
|
||||
type: AuthProviderType.FACEBOOK
|
||||
},
|
||||
{
|
||||
type: AuthProviderType.GITHUB
|
||||
},
|
||||
{
|
||||
type: AuthProviderType.TWITTER
|
||||
},
|
||||
{
|
||||
type: AuthProviderType.DROPBOX
|
||||
},
|
||||
{
|
||||
type: AuthProviderType.GOOGLE
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue