Coder Social home page Coder Social logo

Comments (5)

synasius avatar synasius commented on August 28, 2024

Hi @wiliamsouza

do you think we should use oauthlib functions as a default implementation? is that really necessary?

I mean, the generate_client_id function in oauthlib is more compliant because it uses all the chars defined in the RFC, ok, but at the same time specification leaves you free to decide how the client_secret and the client_id should be generated (google for example use the following as client_id 1084945748469-eg34imk572gdhu83gj5p0an9fut6urp5.apps.googleusercontent.com).

I expect that developers want to use their own generation function and this can be achieved extending BaseHashGenerator and adding your class to settings:

OAUTH2_PROVIDER = {
    'CLIENT_ID_GENERATOR_CLASS':
        'foo.bar.YourClientIdGenerator',
    'CLIENT_SECRET_GENERATOR_CLASS':
        'foo.bar.YourClientSecretGenerator',
}

In the end, I don't think your proposal is a bad idea but I'd like to think about it for a moment.
If you want to continue the conversation I'll be glad.

Thnx a lot

from django-oauth-toolkit.

wiliamsouza avatar wiliamsouza commented on August 28, 2024

I'm in favor to provide the default as especifield by the rfc and let the user choose what to use. I don't see any problem in the way it work today the issue is more informative that oauthlib provides functions to generate client id and secret.

from django-oauth-toolkit.

synasius avatar synasius commented on August 28, 2024

I thought about it and I think it's a good to use oauthlib generation function as the default implementation... it's really better! Anyway we need to add some limitations to client_id generated strings: see issues #24 and #25 for more details.

from django-oauth-toolkit.

palazzem avatar palazzem commented on August 28, 2024

I agree to use oauthlib generation functions as default implementation. However we need to solve quoted issues (I'm on it).

from django-oauth-toolkit.

masci avatar masci commented on August 28, 2024

I merged the PR, think we can close

from django-oauth-toolkit.

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.