I'm using the DRF and ReactJS and I am trying to login with Patreon using
django-rest-framework-social-oauth2
.
In React, I send a request to the back-end auth/login/patreon/
and I reach the Patreon OAuth screen where I say I want to login with PAtreon. Patreon then returns with a request to the back-end at accounts/profile
. At this point a python-social-oauth
user has also been created.
At this point I'm confused. How do I make a request to Patreon to login, create a user in the back-end, and return the session information to the react front-end so that I can include the session information in all following requests from the front-end? I don't want the returned request to be at the backend/accounts/profile
, do I?
Update
I now realize I can set the redirect url with LOGIN_REDIRECT_URL
but still, how do I now retrieve the session id, pass it to the front-end, and include it with all requests?