reef-technologies / cookiecutter-rt-django

CookieCutter template for Django application projects with docker-compose etc.
BSD 3-Clause "New" or "Revised" License
18 stars 22 forks source link

Fix SSO email trust #192

Closed kkowalski-reef closed 3 months ago

kkowalski-reef commented 3 months ago

It looks that the SOCIALACCOUNT_EMAIL_AUTHENTICATION doesn't work as described in allauth's documentation. It's a global setting so it should kick in when there is no provider-specific flag, yet it seems it still tries to grab the value from the provider config, gets an empty result and is satisfied because it looks falsy.

This PR changes the template so that the auth trust flag (EMAIL_AUTHENTICATION) is written into provider configs instead.

Also I introduced a loop to generate the config as 7 out of 10 providers are exactly the same. Ones that require additional config fields have been pulled up the config.

Cookiecutter variables are not changed in this PR - they stay exactly as they were.

kkowalski-reef commented 3 months ago

@kkowalski-reef kkowalski-reef assigned andreea-popescu-reef and kkowalski-reef and unassigned andreea-popescu-reef now

Missclicked, sorry :)