This commit is contained in:
parent
1de1cb4086
commit
32995456c4
7 changed files with 30 additions and 6 deletions
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
import requests
|
||||
from allauth.socialaccount import app_settings
|
||||
from django.core.exceptions import ImproperlyConfigured
|
||||
from allauth.socialaccount.providers.oauth2.views import (
|
||||
OAuth2Adapter,
|
||||
OAuth2CallbackView,
|
||||
|
|
@ -31,7 +32,12 @@ class OAuthAdapter(OAuth2Adapter):
|
|||
|
||||
@property
|
||||
def domain(self):
|
||||
return self.settings.get("DOMAIN", "")
|
||||
domain = self.settings.get("DOMAIN", "")
|
||||
if not domain:
|
||||
raise ImproperlyConfigured(
|
||||
"OAUTH_SERVER_URL is not configured. Set it in your .env file."
|
||||
)
|
||||
return domain
|
||||
|
||||
@property
|
||||
def access_token_url(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue