Search code examples
djangooauthfacebook-javascript-sdkdjango-allauthpython-social-auth

Django-allauth use for facebook login/signup on a json api


I'm evaluating django-allauth for my api. This api must support user signup via json over http as it's powering a phone app.

Reviewing the example demonstrates usage with django templates, i.e. html pages via traditional request-response cycle in a browser.

Is it possible to use django-allauth views to power an app signup on a json api? If not how would you solve this in django? (I've been avoiding django rest framework on this project btw)

would allauth provide a cookie or a jwt the client must put in the Authorization header?

update: python-social-auth also looks popular


Solution

  • I ended up using

    also https://github.com/Tivix/django-rest-auth promises fb login plus the reset password flows for an app.

    For a mobile+api blogpost read https://medium.com/@gabriel_gamil/react-native-expo-django-facebook-authentication-sign-in-83625c49da7 (I was using react native and this was a helpful article)