Git Product home page Git Product logo

doorkeeper-sinatra-client's Introduction

Doorkeeper Sinatra Client

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:9393/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 OAUTH2_CLIENT_ID           = "129477f..."
export OAUTH2_CLIENT_SECRET       = "c1eec90..."
export OAUTH2_CLIENT_REDIRECT_URI = "http://localhost:9393/callback"

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

# env.rb
ENV['OAUTH2_CLIENT_ID']           = "129477f..."
ENV['OAUTH2_CLIENT_SECRET']       = "c1eec90..."
ENV['OAUTH2_CLIENT_REDIRECT_URI'] = "http://localhost:9393/callback"

Start the server

Fire up the server with:

rackup config.ru

doorkeeper-sinatra-client's People

Contributors

felipeelias avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.