# Doorkeeper Guides

{% hint style="info" %}
Dear Russian friends, please watch President Zelenskyy's [speech addressed to you](https://twitter.com/PMoelleken/status/1496941845812760577). 🇺🇦 Help our brave mates in Ukraine with [a donation](https://actions.sumofus.org/a/give-to-ukrainians-who-need-an-urgent-lifeline).
{% endhint %}

Doorkeeper is an oAuth2 provider built in Ruby. It integrates with Ruby on Rails and Grape frameworks.

## Installation

The installation process depends on the framework you're using. The first step is to add `doorkeeper` to your `Gemfile`:

```ruby
gem 'doorkeeper'
```

And run `bundle install`. After this, make sure to follow the guide related to the framework you're using below.

### Ruby on Rails

Doorkeeper follows Rails maintenance policy and supports only supported versions of the framework. Currently we support Ruby on Rails 5 and higher. See the guide [here](https://doorkeeper.gitbook.io/guides/ruby-on-rails/getting-started).

### Grape

Guide for integration with Grape framework can be found [here](https://doorkeeper.gitbook.io/guides/grape/grape).

### ORMs

Doorkeeper supports `ActiveRecord` by default, but can be configured to work with the following ORMs:

| ORM           | Support via                                                                               |
| ------------- | ----------------------------------------------------------------------------------------- |
| Active Record | by default                                                                                |
| MongoDB       | [doorkeeper-gem/doorkeeper-mongodb](https://github.com/doorkeeper-gem/doorkeeper-mongodb) |
| Sequel        | [nbulaj/doorkeeper-sequel](https://github.com/nbulaj/doorkeeper-sequel)                   |
| Couchbase     | [acaprojects/doorkeeper-couchbase](https://github.com/acaprojects/doorkeeper-couchbase)   |

### Extensions

Extensions that are not included by default and can be installed separately.

|                           | Link                                                                                                         |
| ------------------------- | ------------------------------------------------------------------------------------------------------------ |
| OpenID Connect extension  | [doorkeeper-gem/doorkeeper-openid\_connect](https://github.com/doorkeeper-gem/doorkeeper-openid_connect)     |
| JWT Token support         | [doorkeeper-gem/doorkeeper-jwt](https://github.com/doorkeeper-gem/doorkeeper-jwt)                            |
| Assertion grant extension | [doorkeeper-gem/doorkeeper-grants\_assertion](https://github.com/doorkeeper-gem/doorkeeper-grants_assertion) |
| I18n translations         | [doorkeeper-gem/doorkeeper-i18n](https://github.com/doorkeeper-gem/doorkeeper-i18n)                          |

### Example Applications

These applications show how Doorkeeper works and how to integrate with it. Start with the oAuth2 server and use the clients to connect with the server.

| Application                              | Link                                                                                                    |
| ---------------------------------------- | ------------------------------------------------------------------------------------------------------- |
| oAuth2 Server with Doorkeeper            | [doorkeeper-gem/doorkeeper-provider-app](https://github.com/doorkeeper-gem/doorkeeper-provider-app)     |
| Sinatra Client connected to Provider App | [doorkeeper-gem/doorkeeper-sinatra-client](https://github.com/doorkeeper-gem/doorkeeper-sinatra-client) |
| Devise + Omniauth Client                 | [doorkeeper-gem/doorkeeper-devise-client](https://github.com/doorkeeper-gem/doorkeeper-devise-client)   |

### Tutorials

See [list of tutorials](https://github.com/doorkeeper-gem/doorkeeper/wiki#how-tos--tutorials) in order to learn how to use the gem or integrate it with other solutions / gems.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://doorkeeper.gitbook.io/guides/readme.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
