Doorkeeper is a Ruby gem that adds OAuth 2 provider features to Rails or Grape applications.
Overview
Doorkeeper lets Ruby teams turn a Rails or Grape application into an OAuth 2.0 authorization server. It is distributed as a Rails engine gem: add it to your Gemfile, run bundle install, then follow the framework-specific integration guides.
It supports Active Record by default and can be configured for other object-relational mappers through companion gems, including MongoDB, Sequel, Couchbase, and RethinkDB. The feature set covers standard OAuth flows plus extensions such as resource indicators (RFC 8707), refresh-token scope narrowing, optional retention of the previous access token on refresh, and OAuth Client ID Metadata Documents for clients that identify themselves via hosted JSON documents.
Operators must prune expired or revoked tokens and grants manually using bundled rake tasks, because the gem does not remove them automatically. Optional extensions add OpenID Connect, JWT access tokens, assertion grants, internationalization, CIBA, and device authorization. Example server and client applications illustrate typical integration patterns.
Key features
- Rails engine OAuth 2.0 provider
- Grape framework integration
- Multiple ORM backends via extensions
- Resource Indicators (RFC 8707)
- Refresh token scope controls
- Client ID metadata document clients
- Custom grant flow registration
- Bundled token cleanup rake tasks
Use cases
- Adding OAuth to a Rails API
- Running an in-app authorization server
- Issuing tokens for third-party clients
- Grape-based OAuth provider setups