doorkeeper-gem /doorkeeper

Doorkeeper is an OAuth 2 provider for Ruby on Rails / Grape.

★ 5,541⑂ 1,084👁 98⑃ 1,059● 930▤ 83
RubyMITCreated 2011-11-18doorkeeper.gitbook.io/guides/
下载:v5.9.9v5.9.9 ↓5.9.92026-09-24
+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

Discussions

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

Snapshot: 2026-11-16T09:23:14Z · Data license Apache-2.0 · JSON