diff --git a/authentik/sources/oauth/types/facebook.py b/authentik/sources/oauth/types/facebook.py index 1d1ac9d42a58..f871af64bdd2 100644 --- a/authentik/sources/oauth/types/facebook.py +++ b/authentik/sources/oauth/types/facebook.py @@ -2,9 +2,6 @@ from typing import Any -from facebook import GraphAPI - -from authentik.sources.oauth.clients.oauth2 import OAuth2Client from authentik.sources.oauth.types.registry import SourceType, registry from authentik.sources.oauth.views.callback import OAuthCallback from authentik.sources.oauth.views.redirect import OAuthRedirect @@ -19,19 +16,9 @@ def get_additional_parameters(self, source): # pragma: no cover } -class FacebookOAuth2Client(OAuth2Client): - """Facebook OAuth2 Client""" - - def get_profile_info(self, token: dict[str, str]) -> dict[str, Any] | None: - api = GraphAPI(access_token=token["access_token"]) - return api.get_object("me", fields="id,name,email") - - class FacebookOAuth2Callback(OAuthCallback): """Facebook OAuth2 Callback""" - client_class = FacebookOAuth2Client - def get_user_enroll_context( self, info: dict[str, Any], diff --git a/poetry.lock b/poetry.lock index bb02bbeb016d..aa568a4c6bdf 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.8.2 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand. [[package]] name = "aiohttp" @@ -1513,20 +1513,6 @@ files = [ dnspython = ">=2.0.0" idna = ">=2.0.0" -[[package]] -name = "facebook-sdk" -version = "3.1.0" -description = "This client library is designed to support the Facebook Graph API and the official Facebook JavaScript SDK, which is the canonical way to implement Facebook authentication." -optional = false -python-versions = "*" -files = [ - {file = "facebook-sdk-3.1.0.tar.gz", hash = "sha256:cabcd2e69ea3d9f042919c99b353df7aa1e2be86d040121f6e9f5e63c1cf0f8d"}, - {file = "facebook_sdk-3.1.0-py2.py3-none-any.whl", hash = "sha256:2e987b3e0f466a6f4ee77b935eb023dba1384134f004a2af21f1cfff7fe0806e"}, -] - -[package.dependencies] -requests = "*" - [[package]] name = "fido2" version = "1.1.3" @@ -2954,9 +2940,14 @@ version = "0.0.14" description = "Python module for oci specifications" optional = false python-versions = "*" -files = [ - {file = "opencontainers-0.0.14.tar.gz", hash = "sha256:fde3b8099b56b5c956415df8933e2227e1914e805a277b844f2f9e52341738f2"}, -] +files = [] +develop = false + +[package.source] +type = "git" +url = "https://github.com/BeryJu/oci-python" +reference = "3c5e4dbeaea744fd52515c3daba0e28741cb2091" +resolved_reference = "3c5e4dbeaea744fd52515c3daba0e28741cb2091" [[package]] name = "opentelemetry-api" @@ -5350,4 +5341,4 @@ files = [ [metadata] lock-version = "2.0" python-versions = "~3.12" -content-hash = "f960013b56683ab42d82f8b49b2822dffc76046e3d22695ebb737b405a98dbaf" +content-hash = "eda655a724dfc1e879b2d4dba9914e379e1d724d091835f5567f8e07cb6c0aaa" diff --git a/pyproject.toml b/pyproject.toml index 0ffb7638857e..d7bd661c35b3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -110,7 +110,6 @@ docker = "*" drf-spectacular = "*" dumb-init = "*" duo-client = "*" -facebook-sdk = "*" fido2 = "*" flower = "*" geoip2 = "*" @@ -121,7 +120,7 @@ kubernetes = "*" ldap3 = "*" lxml = "*" msgraph-sdk = "*" -opencontainers = { extras = ["reggie"], version = "*" } +opencontainers = { git = "https://github.com/BeryJu/oci-python", rev = "3c5e4dbeaea744fd52515c3daba0e28741cb2091", extras = ["reggie"] } packaging = "*" paramiko = "*" psycopg = { extras = ["c"], version = "*" }