From 7897ca4744d3c8acc3b3b86a9bcc3149bf95d3fd Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Sat, 1 Aug 2020 20:33:38 +0200 Subject: [PATCH] providers/app_gw: fix Client scopes and URLs --- passbook/providers/app_gw/forms.py | 8 +++----- passbook/root/settings.py | 1 + 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/passbook/providers/app_gw/forms.py b/passbook/providers/app_gw/forms.py index 6dddc8927..9e16fc004 100644 --- a/passbook/providers/app_gw/forms.py +++ b/passbook/providers/app_gw/forms.py @@ -20,12 +20,10 @@ class ApplicationGatewayProviderForm(forms.ModelForm): [ResponseType.objects.get_by_natural_key("code")] ) self.instance.client.redirect_uris = [ - f"http://{self.instance.external_host}/oauth2/callback", - f"https://{self.instance.external_host}/oauth2/callback", - f"http://{self.instance.internal_host}/oauth2/callback", - f"https://{self.instance.internal_host}/oauth2/callback", + f"{self.instance.external_host}/oauth2/callback", + f"{self.instance.internal_host}/oauth2/callback", ] - self.instance.client.scope = ["openid", "email"] + self.instance.client.scope = ["openid", "email", "profile"] self.instance.client.save() return super().save(*args, **kwargs) diff --git a/passbook/root/settings.py b/passbook/root/settings.py index 0149abdd9..b661d0b67 100644 --- a/passbook/root/settings.py +++ b/passbook/root/settings.py @@ -377,6 +377,7 @@ _LOGGING_HANDLER_MAP = { "oidc_provider": LOG_LEVEL, "docker": "WARNING", "urllib3": "WARNING", + "elasticapm": "WARNING", } for handler_name, level in _LOGGING_HANDLER_MAP.items(): # pyright: reportGeneralTypeIssues=false