doorkeeper-gem /doorkeeper
Doorkeeper is an OAuth 2 provider for Ruby on Rails / Grape.
★ 5,541⑂ 1,084👁 98⑃ 1,059● 930▤ 83
+0
日增长
5,541
stars
1,084
forks
98
watchers
1,059
prs
930
issues
83
releases
README
Doorkeeper — awesome OAuth 2 provider for your Rails / Grape app. Doorkeeper is a gem (Rails engine) that makes it easy to introduce OAuth 2 provider functionality to your Ruby on Rails or Grape application. Supported features: - The OAuth 2.0 Authorization Framework - Authorization Code Flow - Access Token Scopes - Refresh token - Implicit grant - Resource Owner Password Credentials - Client Credentials - OAuth 2.0 Token Revocation - OAuth 2.0 Token Introspection - OAuth 2.0 Threat Model and Security Considerations - OAuth 2.0 for Native Apps - Proof Key for Code Exchange by OAuth Public Clients - OAuth 2.0 Authorization Server Issuer Identification — opt-in by setting issuer; adds the iss parameter to authorization redirects returned to the client - Resource Indicators for OAuth 2.0 - OAuth Client ID Metadata Documents — opt-in by setting use_client_id_metadata_documents; a client identifies itself with the https URL of its metadata document instead of registering Table of Contents - Documentation - Installation - Ruby on Rails - Grape - ORMs - Extensions - Database maintenance - Resource Indicators - Refresh Token Scopes - Keeping the Previous Access Token on Refresh - Client ID Metadata Documents - Custom Grant Flows - Custom Client Authentication Methods - Example Applications - Sponsors - Development - Contributing - Contributors - License Documentation This documentation is valid for main branch. Please check the documentation for the version of doorkeeper you are using in: https://github.com/doorkeeper-gem/doorkeeper/releases. Additionally, other resources can be found on: - Guides with how-to get started and configuration documentation - See the Wiki for articles on how to integrate with other solutions - Screencast from railscasts.com: 353 OAuth with Doorkeeper - See upgrade guides - For general questions, please post on Stack Overflow - See SECURITY.md for this project's security disclose policy Installation Installation depends on the framework you're using. The first step is to add the following to your Gemfile: ruby gem 'doorkeeper' And run bundle install. After this, check out the guide related to the framework you're using. Ruby on Rails Doorkeeper currently supports Ruby on Rails = 5.0. See the guide here. Grape Guide for integration with Grape framework can be found here. ORMs Doorkeeper supports Active Record by default, but can be configured to work with the following ORMs: | ORM | Support via | | :--- | :--- | | Active Record | by default | | MongoDB | doorkeeper-gem/doorkeeper-mongodb | | Sequel | nbulaj/doorkeeper-sequel | | Couchbase | acaprojects/doorkeeper-couchbase | | RethinkDB | aca-labs/doorkeeper-rethinkdb | Extensions Extensions that are not included by default and can be installed separately. | | Link | | :--- | :--- | | OpenID Connect extension | doorkeeper-gem/doorkeeper-openid\_connect | | JWT Token support | doorkeeper-gem/doorkeeper-jwt | | Assert
Top issues
#1600Is there a way to store Doorkeeper::AccessToken data inside Doorkeeper::JWT (and not use db-backed tokens)?12 comments · 2022-11-08#1678Always requiring `redirect_uri` is not compliant to RFC 67496 comments · 2023-11-22#1948Persist per-client token endpoint authentication methods on `oauth_applications`4 comments · 2026-09-20#1977Support for OAuth 2.0 Refresh Token and Authorization Expiration3 comments · 2026-10-24#1719Refresh Tokens as-implemented are susceptible to Refresh Token Reuse Attacks3 comments · 2024-07-25#1675Better support for credential rotation2 comments · 2023-10-25#1971Allow issuer to be resolved per request, and iss (RFC 9207) to be enabled per application1 comments · 2026-10-07#1655Support OAuth DPoP1 comments · 2023-04-25
Discussions
#1782Support for OAuth 2.0 Dynamic Client Registration Protocol (RFC 7591) for OpenAI ChatGPT Connectors1 comments · 2025-11-15#1763Using redis instead of DB to verify access token2 comments · 2025-02-04#1753Disallowing HTTP query parameters for client_id/client_secret with authorization_code grant_type0 comments · 2024-12-02
Latest release
v5.9.9 v5.9.9 2026-09-24- Fix: AuthorizedApplicationsController now answers 401 Unauthorized instead of running with a nil resource owner, which listed and revoked every token that has no resource owner — the ones the client credentials flow issues. Affected host applications are those whose resource_owner_authenticator answers nil without halting the request itself; the generated initializer's example redirects and is not affected. - Fix: AuthorizationsControllerdestroy now validates the client and redirect URI before producing the deny response, and renders — never redirects — when validation fails. Previously the