/*
 * SPDX-FileCopyrightText: 2025 The HedgeDoc developers (see AUTHORS file)
 *
 * SPDX-License-Identifier: AGPL-3.0-only
 */

import type { AuthProviderInterface } from '@hedgedoc/commons'
import { AuthProviderType } from '@hedgedoc/commons'

/**
 * Filters the given auth providers to one-click providers only.
 * @param authProviders The auth providers to filter
 * @return only one click auth providers
 */
export const filterOneClickProviders = (authProviders: AuthProviderInterface[]) => {
  return authProviders.filter((provider: AuthProviderInterface): boolean => provider.type === AuthProviderType.OIDC)
}
