Giter Club home page Giter Club logo

Comments (7)

bipthelin avatar bipthelin commented on September 1, 2024

Agree, this should be in there.

from oauth2.

IvanMartinez avatar IvanMartinez commented on September 1, 2024

Similar case in oauth2:authorize_code_grant/4, it always issues a refresh token when it is optional in the specification. I see four possible solutions:

  • Making two versions of authorize_password and authorize_code_grant. I don't like it because they would be redundant, only different in wether they use issue_token or issue_token_and_refresh.
  • Add an extra flag parameter to these functions, to tell them wether they should issue a refresh token or not. This is what I'm currently using but I don't really like it, I don't think it's "elegant".
  • Pass issue_token or issue_token_refresh as an argument to authorize_password and authorize_code_grant. I think it's a too fancy and complex solution for a small problem, I don't see the point of so much flexibility if there are just two posibilities.
  • Take issue_token and issue_token_and_refresh out of authorize_password and authorize_code_grant, so developers authorize the grant and then explicitly call the function to issue the token. We would have to change every other oauth2 function to be consistent with this new way. This is my favourite, IMHO it makes perfect sense to separate the request verification from the issuing of tokens and codes.

What do you think?.

from oauth2.

bipthelin avatar bipthelin commented on September 1, 2024

I agree that suggestion 4 is probably the way to go.

from oauth2.

IvanMartinez avatar IvanMartinez commented on September 1, 2024

Good, I will work it out and open and PR.

from oauth2.

bipthelin avatar bipthelin commented on September 1, 2024

Awsome, great work Ivan!

from oauth2.

IvanMartinez avatar IvanMartinez commented on September 1, 2024

See PR #25

from oauth2.

bipthelin avatar bipthelin commented on September 1, 2024

Merged

from 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.