Files
allianceauth/allianceauth/authentication/checks.py
2024-09-13 23:10:37 +10:00

13 lines
434 B
Python

from django.conf import settings
from django.core.checks import Error
def check_login_scopes_setting(*args, **kwargs):
errors = []
try:
assert settings.LOGIN_TOKEN_SCOPES
except (AssertionError, AttributeError):
errors.append(Error('LOGIN_TOKEN_SCOPES setting cannot be blank.',
hint='SSO tokens used for logging in must require scopes to be refreshable.'))
return errors