-
-
Notifications
You must be signed in to change notification settings - Fork 793
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to implement google and facebook oauth2 in django rest framework ? #853
Comments
Do you want to enable people to login using a Google or a Facebook account on your site? Check django-allauth. |
I am not sure but django-allauth doesn't work with django rest framework. |
I don't know what you're trying to achieve here, but let me describe what I did on brwnppr.com and maybe it helps. I wanted to build an application that allows users to login to the application using a social account, like Google and LinkedIn or an email account. This application is based on a REST API, which is consumed via OAuth2. I was struggling with the same thought and the solution I used was basically simpler. To my understanding you're using Bearer tokens to communicatie with the application. The OAuth dance to Google or LinkedIn enables my application to perform requests to Google or LinkedIn using the token that's linked to the users' account, so you're invoking requests on behalf of that user. Those tokens are intended to be used with Google or LinkedIn and are linked to the Google and LinkedIn accounts. The idea is to setup a local account on your Django application, using the data shared by the OAuth provider, which - for you - is Google or Facebook. Does this make sense? |
Thanks for your reply I was previously working with nodejs and this process can be automated using passportjs library which is very well maintained and supported by nodejs community. I can do this myself using a couple of different libraries, but I am trying to save myself some time and effort by finding a package that does this for me. |
I use this for social oauth2 in DRF, works like a charm Doesn’t work as expected... use django-allauth |
That seems to be written for django 1. Is it still working? |
In an issue for django-rest-framework-social-oauth2 I've just read that:
|
@bastbnl What you described above sounds like something I'm trying to accomplish. It sounds like that configuration involves configuring |
I went through the documentation for a way to implement oauth2 using google and facebook providers but can't find anything. I am confused, what is this library really about ?
The text was updated successfully, but these errors were encountered: