-
Notifications
You must be signed in to change notification settings - Fork 104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create a boolean flag to enable/disable social logins #305
Comments
I found something in the source of mailman-web that will help with the configuration of social logins (or the removal of them). https://gitlab.com/mailman/mailman-web/-/blob/master/mailman_web/settings/__init__.py#L6 So if you are not using the latest master you can replicate this behaviour by NOT including the social auth providers in INSTALLED_APPS as you do now. Then it would be as easy as extending Making this change would however break exsisting behaviour so for the people that upgrade there would have to be some way to fall back on adding them by default. Maybe this is where a boolean FLAG comes in? Disabling the default social providers with a env var (e.g. How does this sound? I can probably help with a PR if no one else wants to implement it. |
Yeah, I think it is a good idea to separate INSTALLED_APPS and social auth stuff and perhaps use the env var to turn off the social logins, although, it can also be done by setting whatever the new social auth settings we create to an empty list overriding the default set. I am thinking something along the lines of:
You can set MAILMAN_WEB_SOCIAL_AUTH to |
Thanks for the quick response. Would the following pattern work? For old default installs it would have the same list of apps as we have now, i.e. all social providers. INSTALLED_APPS = []
DEFAULT_APPS = [
# list of default apps, no social login providers
]
MAILMAN_WEB_SOCIAL_AUTH = [
# list of default social login providers
]
try:
from settings_local import *
except ImportError:
pass
if not INSTALLED_APPS:
INSTALLED_APPS = DEFAULT_APPS + MAILMAN_WEB_SOCIAL_AUTH |
Yeah, that's what I was thinking too. Do you want to open a Pull Request with the changes? Please also document the new MAILMAN_WEB_SOCIAL_AUTH env variable so people upgrading can read the release notes and change accordingly. It would be good to point out that older version of the docs recomended overriding INSTALLED_APPS to configure social apps, but it not the best way to achieve the right result if in future there are changes to the "required" applications, it won't be picked up. |
Hey guys, there is a Yahoo button that appears by default in the social login tab as well. As I see in the code it comes from the It would be cool to make it disabled with the flag as well. If not possible I'd prefer to have it commented in the code as an example rather than appearing in the UI. |
@danil-smirnov Aren't This is the override that I use and I see no social addons on my login page. |
Ah yes @gangefors you right it will not show if |
Closed by #446 |
No description provided.
The text was updated successfully, but these errors were encountered: