[Python] Using django-allauth and Google sign-in, how can I prompt the user to choose a...

Discussão em 'Python' iniciado por Stack, Março 5, 2025.

  1. Stack

    Stack Membro Participativo

    We are using Django-allauth to allow users to signup and login using Google.

    The problem is that it automatically chooses first name from Google account as a username.

    Is it possible to make users to fill the username manually?

    I didn't find such settings in Allauth-google docs.

    These are ACCOUNT_ settings from settings.py

    ACCOUNT_AUTHENTICATION_METHOD = "username_email"
    ACCOUNT_CONFIRM_EMAIL_ON_GET = True
    ACCOUNT_EMAIL_REQUIRED = True
    ACCOUNT_EMAIL_VERIFICATION = "mandatory"
    ACCOUNT_EMAIL_SUBJECT_PREFIX = EMAIL_SUBJECT_PREFIX
    ACCOUNT_EMAIL_CONFIRMATION_COOLDOWN = 1
    ACCOUNT_LOGIN_ON_EMAIL_CONFIRMATION = True
    ACCOUNT_PRESERVE_USERNAME_CASING = False
    ACCOUNT_USERNAME_MIN_LENGTH = 4
    ACCOUNT_USERNAME_REQUIRED = True


    There is no such setting starting SOCIALACCOUNT_ in Docs.

    Continue reading...

Compartilhe esta Página