From 69d79cb9122ea55ea9ccf36e61a58cc08cd4bf0c Mon Sep 17 00:00:00 2001 From: Raymond Penners Date: Fri, 11 Aug 2023 09:56:24 +0200 Subject: [PATCH] fix(steam): Require OpenID --- allauth/socialaccount/providers/steam/provider.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/allauth/socialaccount/providers/steam/provider.py b/allauth/socialaccount/providers/steam/provider.py index 8314dd1757..6738c053e2 100644 --- a/allauth/socialaccount/providers/steam/provider.py +++ b/allauth/socialaccount/providers/steam/provider.py @@ -1,5 +1,7 @@ import requests +from django.conf import settings +from django.core.exceptions import ImproperlyConfigured from django.urls import reverse from django.utils.http import urlencode @@ -9,6 +11,12 @@ ) +if "allauth.socialaccount.providers.openid" not in settings.INSTALLED_APPS: + raise ImproperlyConfigured( + "The steam provider requires 'allauth.socialaccount.providers.openid' to be installed" + ) + + class SteamAccount(OpenIDAccount): def to_str(self): dflt = super(SteamAccount, self).to_str()