django-allauth icon indicating copy to clipboard operation
django-allauth copied to clipboard

Setting ACCOUNT_SIGNUP_PASSWORD_ENTER_TWICE to False still asks for password2

Open adriangzz opened this issue 3 years ago • 7 comments

When adding ACCOUNT_SIGNUP_PASSWORD_ENTER_TWICE = False to settings.py I still get this error: password2: ["This field is required."]

adriangzz avatar Jul 08 '20 23:07 adriangzz

Are you sure you restarted the instance? What other settings do you have set currently?

iarp avatar Sep 01 '20 12:09 iarp

I'm experiencing this issue as well. ACCOUNT_SIGNUP_PASSWORD_ENTER_TWICE = False is having no effect. Using the following settings:

ACCOUNT_SESSION_REMEMBER = True
ACCOUNT_SIGNUP_PASSWORD_ENTER_TWICE = False
ACCOUNT_USERNAME_REQUIRED = True
ACCOUNT_AUTHENTICATION_METHOD = 'email'
ACCOUNT_EMAIL_REQUIRED = True
ACCOUNT_UNIQUE_EMAIL = True

ebrahimp avatar Mar 25 '21 23:03 ebrahimp

@ebrahimp

What version of django and allauth are you using? Did you see this?

https://stackoverflow.com/questions/38289442/django-all-auth-remove-asking-password-twice-in-signup-form

Try using ACCOUNT_SIGNUP_PASSWORD_VERIFICATION and report back.

It seems like forms.py SignupForm and BaseSignupForm classes and possibly the views.py SignupView class may be the main culprits. If you figure it out, please post the fix here.

Forms.py:

https://github.com/pennersr/django-allauth/blob/master/allauth/account/forms.py

Views.py:

https://github.com/pennersr/django-allauth/blob/master/allauth/account/views.py

9mido avatar Mar 28 '21 23:03 9mido

@9mido

Yes, I saw that question.

I'm using Django==3.1.4 and django-allauth==0.44.0.

Tried using ACCOUNT_SIGNUP_PASSWORD_VERIFICATION but that didn't work as well.

ebrahimp avatar Mar 29 '21 07:03 ebrahimp

@ebrahimp Strange I just tried it out myself and did not have any problems with it.

9mido avatar Mar 29 '21 19:03 9mido

This still doesn't work with both ACCOUNT_SIGNUP_PASSWORD_ENTER_TWICE = False ACCOUNT_SIGNUP_PASSWORD_VERIFICATION = False

RaceDirectorsHQ avatar Feb 02 '22 10:02 RaceDirectorsHQ

still having issue with it

Ankushpandey-ti avatar Aug 06 '22 07:08 Ankushpandey-ti

still having an issue I'm using Django version 4.1.4 and django-allauth version 0.52.0 I've tried for ACCOUNT_SIGNUP_PASSWORD_ENTER_TWICE = False and ACCOUNT_SIGNUP_PASSWORD_VERIFICATION = False but both doesn't work

pressogh avatar Jan 12 '23 03:01 pressogh

Ok, so i think there is some confusion as to what this setting does. And i'd like to join the club because as far as I can see... it does nothing! A search for ACCOUNT_SIGNUP_PASSWORD_ENTER_TWICE yields results in the tests ensuring the user can post just one password. Users here are likely either expecting the default forms to only have one password w/ this setting set to False OR are still submitting a blank password2 field somehow.


@pennersr this is something that should be removed as a setting OR fully implemented. My suspicion is there was some series of bugs/issues/whatever got us here w/o much intention. You can see the search for password2 yields one hit for 2016 changelog and not much else.

This setting is also notably low value if only ~5 people have commented this kind of thing while it seems to only be used to configure tests to submit only one password.

derek-adair avatar Sep 20 '23 23:09 derek-adair

It works for me. Search the code base for SIGNUP_PASSWORD_ENTER_TWICE instead.

pennersr avatar Sep 21 '23 14:09 pennersr

bah! github's search is garbage. Wonder why the account forms didn't show up for me when i searched for password2.

Cheers!

derek-adair avatar Sep 26 '23 11:09 derek-adair