Plug in django-allauth as endpoint in django-rest-framework-open source projects tomchristie/django-rest-framework

kaay

While I’m not quite sure how to use allauth and rest-fremework together, allauth does not offer such an endpoint. Suggestion: make your own that does a variation of the following: Call allauth.socialaccount.providers.facebook.views.fb_complete_login(None, socialtoken) where socialtoken is as created in login_by_token. That performs (a few functions deeper) a django.contrib.auth.login, possibly creating the acct. After that, for use on mobile devices, it might be possible to the the auth (not FB) token: get the user data (from session?), and call rest_framework.authtoken.views.obtain_auth_token Notes: 1. This offers no way to resolve email conflicts or connect social/local accts.

2. I haven’t tried it – please post code if you can get it working.