File generic-oidc-force-pkce.patch of Package python-social-auth-core

--- a/social_core/backends/open_id_connect.py	2024-02-14 11:20:07.000000000 +0100
+++ b/social_core/backends/open_id_connect.py	2024-05-06 22:17:54.486447253 +0200
@@ -12,7 +12,7 @@
 )
 from jwt.utils import base64url_decode
 
-from social_core.backends.oauth import BaseOAuth2
+from social_core.backends.oauth import BaseOAuth2PKCE
 from social_core.exceptions import AuthTokenError
 from social_core.utils import cache
 
@@ -28,7 +28,7 @@
         self.assoc_type = assoc_type  # as state
 
 
-class OpenIdConnectAuth(BaseOAuth2):
+class OpenIdConnectAuth(BaseOAuth2PKCE):
     """
     Base class for Open ID Connect backends.
     Currently only the code response type is supported.
@@ -63,6 +63,10 @@
     JWKS_URI = ""
     TOKEN_ENDPOINT_AUTH_METHOD = ""
 
+    PKCE_DEFAULT_CODE_CHALLENGE_METHOD = "S256"
+    PKCE_DEFAULT_CODE_VERIFIER_LENGTH = 32
+    DEFAULT_USE_PKCE = True
+
     def __init__(self, *args, **kwargs):
         self.id_token = None
         super().__init__(*args, **kwargs)
openSUSE Build Service is sponsored by