Django Social Auth (0.7.22) is reported to support Custom User Models but I have no been able to get this to work.
In my case I am using Google's Oauth2 which I have working with a non-custom-user-model.
With the Custom User Model I get correctly redirected to the Google Account Page, select an account to login and then and redirected to the LOGIN_ERROR_URL, with no messages or debug info.
To simplify debugging I have created a simple example project with the bare minimum bits and pieces at https://github.com/jonathanendersby/SocialAuthCustomUserModel
Has anyone got this to work and can they point out where I have gone wrong?
This issue is now resolved in the repo at https://github.com/jonathanendersby/SocialAuthCustomUserModel
Quoting https://github.com/omab:
The problem was the parameters that create_user() was getting, not all of them are available on all the backends.
By replacing the method signature with the same from django manager, and setting some default values into first_name and last_name fields in your model, it works OK.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With