I'm developing all my frontend in React.js and not using Django templates.
The templates provided by django-allauth library is convenient, but I want to handle the Google login from my React.js app and not a page created with Django templates.
On the client side, I receive the access token, id token, and the code from Google, when a user does a google login. What I want to do is just send them to my Django server, login the user on the backend, and record this in the database.
How can I do this with django-allauth? Should I be looking at another library? Thanks!
The situation here is that most of the views do accept AJAX requests (and will return AJAX responses in return). For the usual views, such as password reset & email management this can be used to build your SPA on top of (and this is already being used in production). As making the login fully AJAX based, your mileage may vary. The oauth views are redirect based, which collides with an SPA unless properly wrapped. There are also other projects building on top of allauth, such as django-rest-auth.
(closing ticket)
the oauth views are redirect based, which collides with an SPA unless properly wrapped
I am really interested in this part... Any insight I will be grateful
try
https://github.com/ZachLiuGIS/reactjs-auth-django-rest
this work
Is there any development on this? I am facing the same issue. Search the entire internet, but still no luck. Any help in this issue would be great. How to handle react from frontend and then backend from django-allauth?