From 125889bb7f010beec7d4822f797bb5843d7c7af9 Mon Sep 17 00:00:00 2001 From: Francisco Aranda Date: Thu, 14 Nov 2024 11:32:11 +0100 Subject: [PATCH] fix: Using backend.settings --- .../security/authentication/oauth2/provider.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/argilla-server/src/argilla_server/security/authentication/oauth2/provider.py b/argilla-server/src/argilla_server/security/authentication/oauth2/provider.py index 35f976c4a1..fcdd07d73c 100644 --- a/argilla-server/src/argilla_server/security/authentication/oauth2/provider.py +++ b/argilla-server/src/argilla_server/security/authentication/oauth2/provider.py @@ -78,18 +78,17 @@ def __init__( # Social Core uses the key and secret names for the client_id and client_secret # These lines allow the use of the same environment variables as the social_core library. # See https://python-social-auth.readthedocs.io/en/latest/configuration/settings.html for more information. - self.client_id = ( - client_id or self._environment_variable_for_property("client_id") - ) or self._backend.strategy.setting("key") + self.client_id = (client_id or self._environment_variable_for_property("client_id")) or self._backend.setting( + "key" + ) self.client_secret = ( client_secret or self._environment_variable_for_property("client_secret") - ) or self._backend.strategy.setting("secret") + ) or self._backend.setting("secret") - self.scope = (scope or self._environment_variable_for_property("scope")) or self.backend_strategy.setting( + self.scope = (scope or self._environment_variable_for_property("scope")) or self._backend.setting( "scope", default=self._backend.get_scope(), - backend=self._backend, ) if isinstance(self.scope, str): self.scope = self.scope.split(" ")