From 7dec9e52c873284b32bfa902a95310e69ef8e601 Mon Sep 17 00:00:00 2001 From: TheJoeCoder <joe@radialbog9.uk> Date: Tue, 29 Oct 2024 14:57:14 +0000 Subject: [PATCH] Update README.md --- README.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/README.md b/README.md index 433d23c..5330c9c 100644 --- a/README.md +++ b/README.md @@ -84,6 +84,33 @@ docker compose -f docker-compose.prod.yml exec web python manage.py collectstati The app should now be running on `localhost:1337` +## Adding Social Login +Authentication is now provided via django-allauth, so refer to their documentation [here](https://docs.allauth.org/en/latest/installation/quickstart.html). + +For OpenID Connect, add the following to your local_settings.py file: +```python +INSTALLED_APPS += [ + 'allauth.socialaccount.providers.openid_connect', +] + +SOCIALACCOUNT_PROVIDERS = { + "openid_connect": { + "EMAIL_AUTHENTICATION": True, # Only add this line if you want existing accounts to be linked by email + "APPS": [ + { + "provider_id": "my-server", + "name": "My Login Server", + "client_id": "your.service.id", + "secret": "your.service.secret", + "settings": { + "server_url": "https://my.server.example.com", + } + } + ] + } +} + +``` ## Tech Stack -- GitLab