0

Currently, I have a custom user model with the following settings

ACCOUNT_USER_MODEL_USERNAME_FIELD = None
ACCOUNT_EMAIL_REQUIRED = True
ACCOUNT_USERNAME_REQUIRED = False
ACCOUNT_AUTHENTICATION_METHOD = 'email'

and an additional display name field.(non-unique) I added a signup form class to prompt users for a display name.

ACCOUNT_SIGNUP_FORM_CLASS = 'users.forms.SignupForm'

How do I get get allauth to automatically fill in display name(using facebook name) and email address automatically instead of prompting for the display name and email address after clicking on the facebook button?

shad0w_wa1k3r
  • 12,955
  • 8
  • 67
  • 90
kuan
  • 415
  • 1
  • 9
  • 16

1 Answers1

0

Everything is very clearly mentioned in django-alauth documentation.

  1. Add facebook in INSTALLED_APPS by:

    'allauth',
    'allauth.account',
    'allauth.socialaccount',
    'allauth.socialaccount.providers.facebook',
    
  2. Add a Social App in socialaccount app from admin console.

Now, when you tru login using facebook, it will automatically takes name and email, also, it'll save the same in database too.

References: django-allauth tutorial for using multiple socialaccount.

Piyush Maurya
  • 1,945
  • 16
  • 26