Skip to content

pcreux/doorkeeper-sinatra-client-for-basecamp

 
 

Repository files navigation

Doorkeeper Sinatra Client for Basecamp

This app is an OAuth 2 client that runs on Sinatra is patched to work with Basecamp 4 OAuth.

Build Status

This app is an example of OAuth 2 client. It was built in order to test the doorkeeper provider example. It uses oauth2 and sinatra gems. Check out the live app here. The source code is, as always, available on GitHub.

About Doorkeeper Gem

For more information about the gem, documentation, wiki and another resources, check out the project on GitHub.

Installation

First clone the repository from GitHub:

git clone git://github.com/applicake/doorkeeper-sinatra-client.git 

Install all dependencies with:

bundle install 

Configuration

Client application

If you have your own provider or you are using this example, you'll need to create a new client for this application. Make sure to append the /callback to the redirect uri (e.g. http://localhost:9292/callback).

Environment variables

You need to setup few environment variables in order to make the client work. You can either set the variables in you environment:

export PUBLIC_CLIENT_ID = "129477f..." export PUBLIC_CLIENT_REDIRECT_URI = "c1eec90..." export CONFIDENTIAL_CLIENT_ID = "129477f..." export CONFIDENTIAL_CLIENT_SECRET = "c1eec90..." export CONFIDENTIAL_CLIENT_REDIRECT_URI = "http://localhost:9292/callback" export PROVIDER_URL = "https://launchpad.37signals.com" 

or set them in a file named .env in the app's root. This file is loaded automatically by the app.

# .env PUBLIC_CLIENT_ID = "129477f..." PUBLIC_CLIENT_REDIRECT_URI = "c1eec90..." CONFIDENTIAL_CLIENT_ID = "129477f..." CONFIDENTIAL_CLIENT_SECRET = "c1eec90..." CONFIDENTIAL_CLIENT_REDIRECT_URI = "http://localhost:9292/callback" export PROVIDER_URL = "https://launchpad.37signals.com" 

Start the server

Fire up the server with:

bundle exec rackup config.ru 

About

OAuth 2 Client built in Sinatra that works with Basecamp API. Integrates with Doorkeeper gem

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 51.2%
  • HTML 44.6%
  • JavaScript 2.1%
  • Dockerfile 2.1%