Skip to content

Commit

Permalink
move sso settings
Browse files Browse the repository at this point in the history
  • Loading branch information
wh1te909 committed Oct 25, 2024
1 parent e46e6ea commit f94836e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 13 deletions.
18 changes: 18 additions & 0 deletions api/tacticalrmm/ee/sso/sso_settings.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
"""
Copyright (c) 2024-present Amidaware Inc.
This file is subject to the EE License Agreement.
For details, see: https://license.tacticalrmm.com/ee
"""

HEADLESS_ONLY = True
SOCIALACCOUNT_ONLY = True
ACCOUNT_DEFAULT_HTTP_PROTOCOL = "https"
ACCOUNT_EMAIL_VERIFICATION = "none"
SOCIALACCOUNT_ADAPTER = "ee.sso.adapter.TacticalSocialAdapter"
SOCIALACCOUNT_EMAIL_AUTHENTICATION = True
SOCIALACCOUNT_EMAIL_AUTHENTICATION_AUTO_CONNECT = True
SOCIALACCOUNT_EMAIL_VERIFICATION = True

SOCIALACCOUNT_PROVIDERS = {"openid_connect": {"OAUTH_PKCE_ENABLED": True}}

SESSION_COOKIE_SECURE = True
15 changes: 2 additions & 13 deletions api/tacticalrmm/tacticalrmm/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,19 +117,8 @@
TRMM_LOG_LEVEL = "ERROR"
TRMM_LOG_TO = "file"

# settings for django all auth
HEADLESS_ONLY = True
SOCIALACCOUNT_ONLY = True
ACCOUNT_DEFAULT_HTTP_PROTOCOL = "https"
ACCOUNT_EMAIL_VERIFICATION = "none"
SOCIALACCOUNT_ADAPTER = "ee.sso.adapter.TacticalSocialAdapter"
SOCIALACCOUNT_EMAIL_AUTHENTICATION = True
SOCIALACCOUNT_EMAIL_AUTHENTICATION_AUTO_CONNECT = True
SOCIALACCOUNT_EMAIL_VERIFICATION = True

SOCIALACCOUNT_PROVIDERS = {"openid_connect": {"OAUTH_PKCE_ENABLED": True}}

SESSION_COOKIE_SECURE = True
with suppress(ImportError):
from ee.sso.sso_settings import * # noqa

with suppress(ImportError):
from .local_settings import * # noqa
Expand Down

0 comments on commit f94836e

Please sign in to comment.