Code Monkey home page Code Monkey logo

Comments (10)

Sephster avatar Sephster commented on August 18, 2024

There is nothing on this in the spec as far as I'm aware but I don't think there needs to be. Once a client has an access token, why would they go through the process again?

from oauth2-server.

ctadlock avatar ctadlock commented on August 18, 2024

There is nothing on this in the spec as far as I'm aware but I don't think there needs to be. Once a client has an access token, why would they go through the process again?

If they logged in on another computer. We are building a Desktop App and its very common for the same account to be used on multiple workstations.

from oauth2-server.

eugene-borovov avatar eugene-borovov commented on August 18, 2024

@ctadlock tihs is refresh token rotation.

from oauth2-server.

ctadlock avatar ctadlock commented on August 18, 2024

@ctadlock tihs is refresh token rotation.

Thanks. Its related, but not exact.

To simplify my question.. is it OK for the same user/client pair to have multiple unexpired and unrevoken access and refresh tokens?

Im using a modified version of Laravel Passport and it even has code to check to see if a valid token exists, but it only uses it to bypass the authorization step. It then gets handed off to this package which always issues new tokens without regard to any existing active tokens.

https://github.com/laravel/passport/blob/286baeb1be934654fe4eef147b24d3c8a9a3e08d/src/Http/Controllers/AuthorizationController.php#L101

from oauth2-server.

eugene-borovov avatar eugene-borovov commented on August 18, 2024

is it OK for the same user/client pair to have multiple unexpired and unrevoken access and refresh tokens?

No, it isn`t. There are some considerations not to do so.

You can use multiple token pairs to organize multiple user sessions but tokens must be renewed.

from oauth2-server.

ctadlock avatar ctadlock commented on August 18, 2024

That is what happens if you use this library with Laravel Passport. Its not clear to me if the fix would be in this library or Passport. It would seem to me given the code link I put in my first post that it should be in this library. Im not at a level of expertise to know yet, nor submit a PR to resolve it.

Here is the result from my system with the same user (account_id) being authorized to the same client (application_id) on two devices.

image

from oauth2-server.

Sephster avatar Sephster commented on August 18, 2024

If this is for a desktop app I think that app should ensure stored credentials are tied to the logged in user in much the same way as other desktop apps do. Is this not possible?

from oauth2-server.

ctadlock avatar ctadlock commented on August 18, 2024

If this is for a desktop app I think that app should ensure stored credentials are tied to the logged in user in much the same way as other desktop apps do. Is this not possible?

Many of the desktop apps I use use OAuth; GitKraken...

from oauth2-server.

Sephster avatar Sephster commented on August 18, 2024

Do they all definitely have shared credentials though? If I logged into your machine would Git Kraken allow me to have access to all your repos?

from oauth2-server.

Sephster avatar Sephster commented on August 18, 2024

Closing this as I think it is something your app needs to handle rather than this library

from oauth2-server.

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.