{"action":"created","issue":{"url":"https://api.github.com/repos/omab/python-social-auth/issues/575","labels_url":"https://api.github.com/repos/omab/python-social-auth/issues/575/labels{/name}","comments_url":"https://api.github.com/repos/omab/python-social-auth/issues/575/comments","events_url":"https://api.github.com/repos/omab/python-social-auth/issues/575/events","html_url":"https://github.com/omab/python-social-auth/issues/575","id":65928507,"number":575,"title":"Issues while using Custom User model","user":{"login":"neerajd-impinge","id":8953583,"avatar_url":"https://avatars.githubusercontent.com/u/8953583?v=3","gravatar_id":"","url":"https://api.github.com/users/neerajd-impinge","html_url":"https://github.com/neerajd-impinge","followers_url":"https://api.github.com/users/neerajd-impinge/followers","following_url":"https://api.github.com/users/neerajd-impinge/following{/other_user}","gists_url":"https://api.github.com/users/neerajd-impinge/gists{/gist_id}","starred_url":"https://api.github.com/users/neerajd-impinge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neerajd-impinge/subscriptions","organizations_url":"https://api.github.com/users/neerajd-impinge/orgs","repos_url":"https://api.github.com/users/neerajd-impinge/repos","events_url":"https://api.github.com/users/neerajd-impinge/events{/privacy}","received_events_url":"https://api.github.com/users/neerajd-impinge/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-04-02T13:41:55Z","updated_at":"2015-04-03T00:28:56Z","closed_at":"2015-04-03T00:28:56Z","body":"I am using Custom user model for usig email authentication.My model looks like : \r\n\r\n\r\n```\r\nclass User(AbstractBaseUser, PermissionsMixin):\r\n    pk_user = UUIDField(auto=True, primary_key=True, serialize=True, hyphenate=True)\r\n    email = models.EmailField(_('email address'), max_length=254, unique=True)\r\n    first_name = models.CharField(_('first name'), max_length=30, blank=True)\r\n    last_name = models.CharField(_('last name'), max_length=30, blank=True)\r\n    is_staff = models.BooleanField(_('staff status'), default=False,\r\n        help_text=_('Designates whether the user can log into this admin '\r\n                    'site.'))\r\n    is_active = models.BooleanField(_('active'), default=True,\r\n        help_text=_('Designates whether this user should be treated as '\r\n                    'active. Unselect this instead of deleting accounts.'))\r\n    date_joined = models.DateTimeField(_('date joined'), default=timezone.now)\r\n\r\n    objects = CustomUserManager()\r\n\r\n    USERNAME_FIELD = 'email'\r\n    REQUIRED_FIELDS = []\r\n\r\n```\r\nNow If I am using facebook then I am getting ` 'username' is an invalid keyword argument for this function ` error and for twitter ` email must be set ` error .\r\n\r\nThese error comes because I have removed usern ame field and email field is required . \r\n\r\nI have defined extra settings to overcome above issues but nothing works : \r\n```\r\nSOCIAL_AUTH_FACEBOOK_SCOPE = ['email']\r\nSOCIAL_AUTH_USER_MODEL = 'accounts.User'\r\nSOCIAL_AUTH_USERNAME_IS_FULL_EMAIL = True\r\n```\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/omab/python-social-auth/issues/comments/89092362","html_url":"https://github.com/omab/python-social-auth/issues/575#issuecomment-89092362","issue_url":"https://api.github.com/repos/omab/python-social-auth/issues/575","id":89092362,"user":{"login":"omab","id":91022,"avatar_url":"https://avatars.githubusercontent.com/u/91022?v=3","gravatar_id":"","url":"https://api.github.com/users/omab","html_url":"https://github.com/omab","followers_url":"https://api.github.com/users/omab/followers","following_url":"https://api.github.com/users/omab/following{/other_user}","gists_url":"https://api.github.com/users/omab/gists{/gist_id}","starred_url":"https://api.github.com/users/omab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/omab/subscriptions","organizations_url":"https://api.github.com/users/omab/orgs","repos_url":"https://api.github.com/users/omab/repos","events_url":"https://api.github.com/users/omab/events{/privacy}","received_events_url":"https://api.github.com/users/omab/received_events","type":"User","site_admin":false},"created_at":"2015-04-03T00:28:56Z","updated_at":"2015-04-03T00:28:56Z","body":"Twitter doesn't disclose email address, so you won't be getting one when using that backend. About ``username``, that's because the user creation is calling your user manager ``create_user()`` method, by default it will pass the ``username`` parameter, but you can avoid that by defining ``SOCIAL_AUTH_USER_FIELDS = ['email']`` (set any parameter name that your ``create_user()`` method expects)."}}