Giter Site home page Giter Site logo

Comments (6)

nbulaj avatar nbulaj commented on August 16, 2024 1

Can we close this issue? Or do you think it makes sense to add some extra protection into #find_or_create_for method?

def find_or_create_for(application:, resource_owner:, scopes:, **token_attributes)
  scopes = Doorkeeper::OAuth::Scopes.from_string(scopes) if scopes.is_a?(String)
  # ...
end

from doorkeeper.

pdany1116 avatar pdany1116 commented on August 16, 2024 1

I think it makes sense to add extra protection, I was not expecting this to be the problem, maybe other devs will encounter the same issue and be confused.

I would like to contribute if possible 😄

from doorkeeper.

nbulaj avatar nbulaj commented on August 16, 2024 1

Yeah sure, will be great @pdany1116 , thanks a lot! Please refer CONTRIBUTING guide when open a PR 🙏

from doorkeeper.

pdany1116 avatar pdany1116 commented on August 16, 2024

Hi, thanks for this awesome and useful gem! I can look into the issue and propose some tests + fix. But before getting to work, I want to make sure this is a valid case and I am not missing anything.

Thank you!

from doorkeeper.

nbulaj avatar nbulaj commented on August 16, 2024

Hey @pdany1116 . Try to use Doorkeeper::OAuth::Scopes.from_string("") instead.

Also even plain one works without issues for me:

image

Looks like depends from configuration, but try to use above advise.

UPD: yes, requires reuse_access_token config option to be enabled

from doorkeeper.

pdany1116 avatar pdany1116 commented on August 16, 2024

Indeed, I have the reuse_access_token config option enabled.

Works with Doorkeeper::OAuth::Scopes.from_string(""), thanks!

from doorkeeper.

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.