I have:
Website with Django: django-allauth ; I can connect to it using the usual login and facebook login, and they work fine through browsers (checking cookies).
I am creating an Android application that is supposed to provide a login, registration, password reset and using the API of my site; Looks like I should use Token Authentication for mobile; For a normal token login, I will use the django rest framework Token Authentication , because:
For successful authentication, TokenAuthentication provides the following credentials.
request.user will be an instance of a Django user.
request.auth will be an instance of rest_framework.authtoken.models.BasicToken.
I need to control user actions. In this way, I will create a separate API for the token-regular login for mobile application users. The token will be generated on the server side when the user provides the correct username and password, after which he will be returned to him (mobile application) to send it back to the server for each request that requires authentication.
All this must be beautiful. But the problem is how to log in to my site using Facebook through my mobile application, the mobile application must be connected to the Facebook Button, which allows users to connect using their Facebook account (they may be asked to confirm via Facebook)
I need to know how this is possible, and I would like to get:
request.user will be an instance of a Django user. within each request is executed.
source share