Hi everyone,
Is there a way to enable social signup (vs just login for existing users)?
I've just implemented social login on my mailman lists, but realised it seems to be only login, and not signup...or at least I couldn't fine specific info to enable social signup.
Is social signup something anyone has implemented (and if so how). If not, I suspect there might be a good reason (e.g. privacy, security, etc) but I'd love to hear it :-)
Duane
On 3/12/23 13:56, Duane Raymond wrote:
Hi everyone,
Is there a way to enable social signup (vs just login for existing users)?
It isn't at all clear or documented, but a user without an account can go to the login page and login via a social account button and this will create an account connected to that social account and log the user in.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
HI Mark,
On Sun, 12 Mar 2023 at 22:06, Mark Sapiro <mark@msapiro.net> wrote:
On 3/12/23 13:56, Duane Raymond wrote:
Is there a way to enable social signup (vs just login for existing users)?
It isn't at all clear or documented, but a user without an account can go to the login page and login via a social account button and this will create an account connected to that social account and log the user in.
Thanks for clarifying. Once I implemented social login, the buttons for social login did appear fine on the login page, but not on the signup page. I noticed for this list as well, there are no social signup buttons.
So if it works, how does this happen?
- Is there something I am missing adding to my settings.py and settings_local.py files to make it appear on the Posterius/Hyperkitty signup (vs login) page? (I searched but couldn't find anything)
- Do I manually add this code to the Posterius/Hyperkitty signup template?
- If a user tries to login via the login page and isn't registered will it be counted as a signup?
- something else :-)
I'm trying to get my head around where this is working from / what I need to do to get social signup obvious on the signup page (or other route)
Cheers,
Duane
On 3/12/23 14:32, Duane Raymond wrote:
Thanks for clarifying. Once I implemented social login, the buttons for social login did appear fine on the login page, but not on the signup page. I noticed for this list as well, there are no social signup buttons.
The buttons do not appear on the sign-up page. They probably should, but they don't.
So if it works, how does this happen?
1. Is there something I am missing adding to my settings.py and settings_local.py files to make it appear on the Posterius/Hyperkitty signup (vs login) page? (I searched but couldn't find anything)
You aren't missing anything.
2. Do I manually add this code to the Posterius/Hyperkitty signup template?
No
3. If a user tries to login via the login page and isn't registered will it be counted as a signup?
Yes, that's how it works.
I'm trying to get my head around where this is working from / what I need to do to get social signup obvious on the signup page (or other route)
I just created https://gitlab.com/mailman/django-mailman3/-/issues/67 for this.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Thanks for clarifying Mark,
I'll dip into the code in the next weeks and see if I can figure out how to add it (using the example of the login page)
Cheers,
Duane
Duane Raymond writes:
I'll dip into the code in the next weeks and see if I can figure out how to add it (using the example of the login page)
Welcome to the team! :-D
I doubt you need any Python code; I think you just need to add buttons in HTML in the page template, and an explanation of where the user will end up (probably not where they expect ;-). I forget how this works, but you might even be able to ensure a redirect to where they expect to go in pure Django templating language. If not, it will likely need a straightforward one-line change to the view.
If all that makes sense to you, great! If not, feel free to ask questions, here, or perhaps more appropriately on mailman-developers@python.org.
Steve
Thanks Stephen,
With support to dip in on how to do this, I would hope it is the start of a series of contributions to the platform :-)
My starting point these days is asking chatGPT how to add the functionality. The response looks convincing but often has some glaring errors in it...but at least it helps me narrow down where I start and give me an idea of the steps/complexity of the task.
I'll jump over to the developers list when I start this (I'm about to travel for a week to run an annual event in Oxford - so the far removed from programming)...but which chatGPT suggested so far was
- Extending postorius/signups.html with a loop to get the configured social login providers PLUS adding a csrf_token field to the form
- Modifying postorius/views.py (which doesn't seem to exist but there is a postorius/views folder) - so perhaps this is views/urls.py
So with dev community support and chatGPT support I should be able to muddle through it!
Probably as practice I'll convert a recent simple Flask app I built into django to get familiar with Django as a framework before I dip into postorius & hyperkitty
Cheers,
Duane
On Wed, 15 Mar 2023 at 08:26, Stephen J. Turnbull < turnbull.stephen.fw@u.tsukuba.ac.jp> wrote:
Duane Raymond writes:
I'll dip into the code in the next weeks and see if I can figure out how to add it (using the example of the login page)
Welcome to the team! :-D
I doubt you need any Python code; I think you just need to add buttons in HTML in the page template, and an explanation of where the user will end up (probably not where they expect ;-). I forget how this works, but you might even be able to ensure a redirect to where they expect to go in pure Django templating language. If not, it will likely need a straightforward one-line change to the view.
If all that makes sense to you, great! If not, feel free to ask questions, here, or perhaps more appropriately on mailman-developers@python.org.
Steve
On 3/15/23 05:08, Duane Raymond wrote:
I'll jump over to the developers list when I start this (I'm about to travel for a week to run an annual event in Oxford - so the far removed from programming)...but which chatGPT suggested so far was
1. Extending postorius/signups.html with a loop to get the configured social login providers PLUS adding a csrf_token field to the form 2. Modifying postorius/views.py (which doesn't seem to exist but there is a postorius/views folder) - so perhaps this is views/urls.py
This is not what you want to do for this. The changes need to be in django-mailman3, not postorius. I have attached a patch which might work for you. I think it is good, but some of the wording is stuff that may not be appropriate. See what you think.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Wow - thanks for the redirection on where to patch it and the first-cut code. I'll look into this in 2 weeks when I am able to focus on it.
Cheers,
Duane
On Wed, 15 Mar 2023 at 16:18, Mark Sapiro <mark@msapiro.net> wrote:
On 3/15/23 05:08, Duane Raymond wrote:
I'll jump over to the developers list when I start this (I'm about to travel for a week to run an annual event in Oxford - so the far removed from programming)...but which chatGPT suggested so far was
1. Extending postorius/signups.html with a loop to get the configured social login providers PLUS adding a csrf_token field to the form 2. Modifying postorius/views.py (which doesn't seem to exist but
there
is a postorius/views folder) - so perhaps this is views/urls.py
This is not what you want to do for this. The changes need to be in django-mailman3, not postorius. I have attached a patch which might work for you. I think it is good, but some of the wording is stuff that may not be appropriate. See what you think.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Mailman-users mailing list -- mailman-users@mailman3.org To unsubscribe send an email to mailman-users-leave@mailman3.org https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/ Archived at: https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/message/...
This message sent to duane@fairsay.com
Duane Raymond wrote:
Wow - thanks for the redirection on where to patch it and the first-cut code. I'll look into this in 2 weeks when I am able to focus on it.
I have submitted https://gitlab.com/mailman/django-mailman3/-/merge_requests/198 for this. It is currently a draft because I'm looking for feedback on the specific wording.
participants (3)
-
Duane Raymond
-
Mark Sapiro
-
Stephen J. Turnbull