Doorkeeper
Doorkeeper is an OAuth 2 provider for Ruby on Rails / Grape
...The installation process depends on the framework you're using. Doorkeeper follows Rails maintenance policy and supports only supported versions of the framework. Currently, we support Ruby on Rails 5 and higher. Extensions that are not included by default and can be installed separately. 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. See list of tutorials in order to learn how to use the gem or integrate it with other solutions/gems.