[Solved]-What is the right way to use django-allauth with tastypie?


Quick look into django-allauth shows that they are using SocialAccount model to hold data on specific method of authentication and type of social account.

You need to create an API endpoint based on SocialAccount model. You need to pass there variables like: account type (facebook, local, twitter etc), additional auth variables needed by social auth providers. Then, in your code you can create SocialAccount model instances, feed with data received from API endpoint call and trigger corresponding auth call via django-allauth. Finally you should return result of your auth call.

I don’t see a big reason to use django-allauth for local/facebook auth only, with some small effort you can have whole range of social auth providers.


I used requests library to deal with facebook API and it works great, I think no social login plugin for Django works for others but the author, if you want to do something seriously.

PS. I used django-rest-framework to build the rest backend for mobile apps, also including local account login and social site login.

Leave a comment