diff --git a/setup.py b/setup.py index 9a6188a..d8152db 100644 --- a/setup.py +++ b/setup.py @@ -23,7 +23,7 @@ name="sfdo-template-helpers", # Required # https://www.python.org/dev/peps/pep-0440/ # https://packaging.python.org/en/latest/single_source_version.html - version="0.23.0", # Required + version="0.24.0", # Required # https://packaging.python.org/specifications/core-metadata/#summary description="A set of Django helpers and utils used by sfdo-template projects.", # https://packaging.python.org/specifications/core-metadata/#description-optional diff --git a/sfdo_template_helpers/oauth2/salesforce/provider.py b/sfdo_template_helpers/oauth2/salesforce/provider.py index 4b5f369..4582312 100644 --- a/sfdo_template_helpers/oauth2/salesforce/provider.py +++ b/sfdo_template_helpers/oauth2/salesforce/provider.py @@ -4,11 +4,12 @@ class SFDOSalesforceProvider(SalesforceProvider): package = "sfdo_template_helpers.oauth2.salesforce" - def get_auth_params(self, request, action): - ret = super().get_auth_params(request, action) + def get_auth_params(self): + ret = super().get_auth_params() # This will ensure that even if you're logged in to Salesforce, # you'll be prompted to choose an identity to auth as: ret["prompt"] = "login" + ret["approval_prompt"] = "force" return ret def extract_uid(self, data): diff --git a/sfdo_template_helpers/oauth2/salesforce/tests/test_provider.py b/sfdo_template_helpers/oauth2/salesforce/tests/test_provider.py index e8407ae..3a99d49 100644 --- a/sfdo_template_helpers/oauth2/salesforce/tests/test_provider.py +++ b/sfdo_template_helpers/oauth2/salesforce/tests/test_provider.py @@ -17,7 +17,7 @@ def dummy_app(): @pytest.mark.django_db def test_get_auth_params(rf, dummy_app): request = rf.get("/") - result = SFDOSalesforceProvider(request, dummy_app).get_auth_params(request, None) + result = SFDOSalesforceProvider(request, dummy_app).get_auth_params() assert "prompt" in result and result["prompt"] == "login"