Skip to content

Commit

Permalink
fix: Using backend.settings
Browse files Browse the repository at this point in the history
  • Loading branch information
frascuchon committed Nov 14, 2024
1 parent 8773c08 commit 125889b
Showing 1 changed file with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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(" ")
Expand Down

0 comments on commit 125889b

Please sign in to comment.