Authentication and account creation via an external SSO provider
django-allauth
to extend basic account creation and authentication to support Single Sign-On (SSO) and multi-factor authentication (MFA). You can learn more here:
Introduction - django-allauth
The django-allauth
documentation covers the available SSO providers. There are dozens of options for social networks and business accounts, but the major providers you are probably looking for are covered–e.g., Microsoft, Google, GitHub, Slack, and Okta.
SOCIALACCOUNT_PROVIDERS
configuration and list of SSO_PROVIDERS
.
There are a few more configuration options you may need to change.
DJANGO_SOCIAL_ACCOUNT_ALLOW_REGISTRATION
to true
or false
with Ghostwriter CLI. Alternatively, you can set SOCIAL_ACCOUNT_ALLOW_REGISTRATION
in your config file.
Using Ghostwriter CLI for these configuration changes makes everything easier. To apply the change (e.g., turning registration on or off), you must only bring the containers down and back up. If you change a Python config file, the containers must be rebuilt.
You may want to allow registration but only for specific domains. The domain allowlist manages email domains you want to allow to authenticate or register via SSO. Like the registration setting, you can set this via Ghostwriter CLI or in your config file.
Set DJANGO_SOCIAL_ACCOUNT_DOMAIN_ALLOWLIST
with Ghostwriter CLI or SOCIAL_ACCOUNT_DOMAIN_ALLOWLIST
in your config file. The allowlist can be defined as a space-separated list or a Python list (if setting it in your config file).
Here is what this might look like in your config file:
DJANGO_SOCIAL_ACCOUNT_LOGIN_ON_GET
to true
with Ghostwriter CLI. For information is available here: