# Doorkeeper

> An OAuth 2 provider for Ruby on Rails / Grape

Source: https://talira.ai/catalog/doorkeeper-3w6knwa1
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [security / auth / oauth server](https://talira.ai/categories/security/auth/oauth-server), [languages / ruby / rails](https://talira.ai/categories/languages/ruby/rails)
- Platforms: linux, macos, windows
- Licence: MIT
- Pricing: Free and open source
- Free tier: yes
- Self-hostable: yes
- Plugins: yes

Doorkeeper is a Rails engine that turns a Rails or Grape app into an OAuth 2 authorization server, so other apps can ask your users for access and call your API with tokens. It implements the authorization code flow with PKCE, client credentials, refresh tokens, scopes, token revocation and introspection, OAuth for native apps, issuer identification, resource indicators and, as opt-ins, OAuth client ID metadata documents. Active Record is the default store, with extensions for Sequel, [MongoDB](https://talira.ai/catalog/mongodb-bnayk648.md) and others, and doorkeeper-openid_connect adds OpenID Connect.

## Links

- Website: https://doorkeeper.gitbook.io/guides/
- GitHub: https://github.com/doorkeeper-gem/doorkeeper
- Docs: https://doorkeeper.gitbook.io/guides/

## Problems it solves

- let third-party apps connect to our Rails API with OAuth instead of API keys
- add an OAuth server to my app so an MCP client can sign users in
- build a 'Sign in with our app' flow for partners
- issue access tokens with scopes and refresh tokens from my Rails app
- support PKCE for a mobile app talking to our API
- revoke an integration's access token when a user disconnects it
- let clients identify themselves with a metadata URL instead of registering first
- machine-to-machine tokens with the client credentials grant
- become an OpenID Connect provider in Rails

## Features

- authorization code flow with PKCE
- client credentials
- refresh tokens and scopes
- implicit and password grants
- token revocation (RFC 7009)
- token introspection (RFC 7662)
- OAuth for native apps (RFC 8252)
- issuer identification (RFC 9207)
- resource indicators (RFC 8707)
- client ID metadata documents (opt-in)
- Active Record, plus Sequel and MongoDB extensions
- OpenID Connect through doorkeeper-openid_connect

## Capabilities

- Takes plugins: plan not known

## Trust

Overall: 0.67 out of 1.
Signals: maintenance 1.00, adoption 0.75, momentum 0.45, community 1.00, backing 0.00, extensibility 0.20.

- last commit 9 days ago
- 131 commits in the last 90 days
- latest release v5.9.9 2 months ago
- 5.5k GitHub stars
- 347 contributors
- accepts sponsorship (Open Collective)
- has a plugin system

## Alternatives

- [Auth0](https://talira.ai/catalog/auth0-zph5jvgk.md): Hosted authentication and authorization for apps (an Okta product)
- [Ory](https://talira.ai/catalog/ory-9g8j29sf.md): Headless, cloud-native identity: authentication, OAuth2/OIDC and permissions
- [Keycloak](https://talira.ai/catalog/keycloak-jw9hhr96.md): Open source identity and access management for modern applications and services
- [Ory Hydra](https://talira.ai/catalog/ory-hydra-5zw4xv65.md): Open source, OpenID Certified OAuth 2.0 server and OpenID Connect provider
