diff --git a/kursy/settings/base.py b/kursy/settings/base.py index bb5d1aa..d2b95d9 100644 --- a/kursy/settings/base.py +++ b/kursy/settings/base.py @@ -133,6 +133,26 @@ SOCIALACCOUNT_PROVIDERS = { WSGI_APPLICATION = "kursy.wsgi.application" +OAUTH2_PROVIDER = { + "OIDC_ENABLED": True, + "OIDC_RPID_ENDPOINT": "http://127.0.0.1:8000/oauth2", + "OIDC_ISS_ENDPOINT": "http://127.0.0.1:8000", + "PKCE_REQUIRED": False, + "OAUTH2_VALIDATOR_CLASS": "kursy.oauth_validators.CustomOAuth2Validator", + "SCOPES": { + "openid": "OpenID Connect scope", + "profile": "User profile scope", + "email": "User email scope", + "read": "Read scope", + "write": "Write scope", + }, + "OIDC_CLAIM_MAPS": { + "nickname": "preferred_username", + "email": "email", + }, + "DEFAULT_SCOPES": ["openid", "profile", "email"], +} + # Database # https://docs.djangoproject.com/en/6.0/ref/settings/#databases