devise-doorkeeper | Integrate Doorkeeper OAuth2 tokens into Devise applications | OAuth library

 by   betterup Ruby Version: Current License: MIT

kandi X-RAY | devise-doorkeeper Summary

kandi X-RAY | devise-doorkeeper Summary

devise-doorkeeper is a Ruby library typically used in Security, OAuth, Ruby On Rails applications. devise-doorkeeper has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. You can download it from GitHub.

Integrate Doorkeeper OAuth2 tokens into Devise applications
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              devise-doorkeeper has a low active ecosystem.
              It has 63 star(s) with 20 fork(s). There are 64 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 9 open issues and 4 have been closed. On average issues are closed in 1 days. There are 9 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of devise-doorkeeper is current.

            kandi-Quality Quality

              devise-doorkeeper has 0 bugs and 0 code smells.

            kandi-Security Security

              devise-doorkeeper has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              devise-doorkeeper code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              devise-doorkeeper is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              devise-doorkeeper releases are not available. You will need to build from source code and install.
              Installation instructions, examples and code snippets are available.
              devise-doorkeeper saves you 302 person hours of effort in developing the same functionality from scratch.
              It has 818 lines of code, 28 functions and 53 files.
              It has low code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of devise-doorkeeper
            Get all kandi verified functions for this library.

            devise-doorkeeper Key Features

            No Key Features are available at this moment for devise-doorkeeper.

            devise-doorkeeper Examples and Code Snippets

            No Code Snippets are available at this moment for devise-doorkeeper.

            Community Discussions

            QUESTION

            Why am I receiving 401 Unauthorized errors with my Doorkeeper configuration?
            Asked 2021-May-05 at 19:48

            I have a Rails 6.1 app using devise 4.7.1, doorkeeper 5.5.1, and devise-doorkeeper 1.2.0.

            I'm trying to run through a (PKCE) OAuth flow, but the final step -- a POST request to /oauth/token -- returns a 401 Unauthorized error with the JSON content {"error": "You need to sign in or sign up before continuing."}.

            I'm confused about this, since the /oauth/token endpoint should be accessible to unauthenticated users as far as I understand. What's also weird (but perhaps a red herring) is that if I attempt to run the same POST request with curl, but remove the User-Agent header, it succeeds.

            My current suspect is this block of code in initializers/doorkeeper.rb:

            ...

            ANSWER

            Answered 2021-May-05 at 19:47

            This problem was caused by our use of the Ahoy analytics library.

            By default, this library tracks all page visits in your Rails app. It tries to get the current user using current_user || current_resource_owner. Because current_user was still nil when POSTing to /oauth/token, getting current_resource_owner ended up calling our Doorkeeper resource_owner_authenticator, which returned the 401 error. The source code for this is here.

            This also explains why things worked as expected when unsetting the User-Agent header: with no user agent (or the user agent of e.g. curl), Ahoy treats the request as coming from a bot, and doesn't attempt to track it (source code here).

            Our solution to this is to tell Ahoy to stop tracking all page views automatically by setting Ahoy.api_only = true in its configuration.

            Source https://stackoverflow.com/questions/67387915

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install devise-doorkeeper

            Add this line to your application's Gemfile:.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/betterup/devise-doorkeeper.git

          • CLI

            gh repo clone betterup/devise-doorkeeper

          • sshUrl

            git@github.com:betterup/devise-doorkeeper.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular OAuth Libraries

            satellizer

            by sahat

            cpprestsdk

            by microsoft

            oauth2-server

            by thephpleague

            scribejava

            by scribejava

            socialite

            by laravel

            Try Top Libraries by betterup

            boolean_timestamps

            by betterupRuby

            ember-draggable

            by betterupJavaScript

            dotenv-beefy

            by betterupRuby