Coder Social home page Coder Social logo

Comments (8)

PhilipGarnero avatar PhilipGarnero commented on May 29, 2024

I don't understand you here. Why would you want to pass client id and secret to those views ?

from django-rest-framework-social-oauth2.

ashishtajane avatar ashishtajane commented on May 29, 2024

I am new to oAuth in general, so please bear with me if this sounds a newbie question.
So, what is the use of client id and secret in general in these requests ?
My understanding was, we can identify and verify different clients with these -- like mobile app, webapp, desktop app are different clients, also we can provide API access to third parties for various purposes so each third party becomes a client.
So, here, we can verify a normal login request (/auth/token/) is coming from genuine client as client credentials are a must for this view. But for social logins, someone can get an access_token using /auth/convert-token/ view even if they don't have client credentials. And if we are allowing this, then what is the use of using client id and secret in those other views at all?

from django-rest-framework-social-oauth2.

PhilipGarnero avatar PhilipGarnero commented on May 29, 2024

Hum... No, you're right this is a legitimate question.
For now, we are using the Owner application by default when converting a token. This means that every token you generate with this will belong to our app. This is fine when you don't handle third party clients but when you'll need them, you will be stuck with a good part of tokens not actually belonging to them and as a result probably breaking some oauth2 features.
Making this changes will break the api but it seems necessary.
Thank you for this report I will update the code and release a new version as soon as I'm free.

from django-rest-framework-social-oauth2.

ashishtajane avatar ashishtajane commented on May 29, 2024

Cool, Thanks! 👍
Do let me know if I could be of any help, as I am using this currently in my app.

from django-rest-framework-social-oauth2.

PhilipGarnero avatar PhilipGarnero commented on May 29, 2024

After some thinking, this is more complicated than I first thought.
Depending on the client type of the application, the parameters needed don't limit themselves to client_id and secret.
I probably need to implement the exact same behavior as /token but I will need to investigate on how I could handle the different grants and clients using it.

from django-rest-framework-social-oauth2.

PhilipGarnero avatar PhilipGarnero commented on May 29, 2024

I think the OauthlibMixin provided by oauth2_provider should do it with some customizations.
I'll try this tomorrow

from django-rest-framework-social-oauth2.

felix-d avatar felix-d commented on May 29, 2024

So how does it go? If you need some help I could try to give a hand. This module is crucial for me :P Well i don't have the need for third party clients right now but that might become a possibility in the future. When the issue is resolved, I'll link the repo to my blog post as well. It naively discusses the usage of python social auth with oauth2 toolkit but your module is way more complete and right than what I wrote lol

from django-rest-framework-social-oauth2.

PhilipGarnero avatar PhilipGarnero commented on May 29, 2024

Well, I think this is fixed now.
Please tell me if that fulfills your needs and report any bug encountered.
I'll close this for now.

from django-rest-framework-social-oauth2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.