manfredobelugo
manfredobelugo

Reputation: 75

How to combine social auth/oauth with django custom user model

I have a custom user model that is based on AbstractBaseUser, PermissionsMixin and I would love to use a package such as django-allauth and/or social-auth-app-django. I have done some research but did not find any tutorials or examples. Can somebody recommend anything?

Upvotes: 0

Views: 404

Answers (1)

Vincent
Vincent

Reputation: 1564

You need to set the User model for the social auth package in your settings.py. For example:

SOCIAL_AUTH_USER_MODEL = 'app.YourCustomUser'

Read more about it here: https://python-social-auth.readthedocs.io/en/latest/configuration/settings.html#user-model

Upvotes: 1

Related Questions