Skip to content

19dev/doorkeeper-devise-client

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Seyyah Not

1. Provider'da new app

http://localhost:4000/users/sign_in git ve,

http://localhost:4000/oauth/applications/new git ve,

Application: test
Callback url: http://localhost:3000/users/auth/doorkeeper/callback
Application Id: XXX
Secret: YYY

yeni app ekle.

2. Client configuration

config/initializers/devise.rb dosyasını bul ve güncelle,

config.omniauth :doorkeeper,  DOORKEEPER_APP_ID, DOORKEEPER_APP_SECRET, :client_options =>  {:site => DOORKEEPER_APP_URL}

http://localhost:3000/ adresine git ve,

Sign in with OAuth 2 provider=> http://localhost:3000/users/auth/doorkeeper linkine tıkla.

Dookreeper Devise+Omniauth Client

This app is an example of OAuth2 client. It was built in order to test the doorkeeper provider example. It uses rails, devise and omniauth gems. OAuth2 strategy is build on top of abstract OAuth2 strategy for OmniAuth

About Doorkeeper Gem

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

Installation & Configuration

If you want to run the application by yourself here are the steps for you.

First you need to clone the repository from GitHub

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

Install all the gems

bundle install

And migrate the databse

rake db:migrate

At this point the application should be ready to run, but it won't communicate correctly with the provider. You need to set up environment variables to indicate the oauth2 provider values. In your environemnt file set up these variables

DOORKEEPER_APP_ID = "375c2e3fd..." # ID for your app registered at the provider
DOORKEEPER_APP_SECRET = "6a2fa82ab..." # Secret
DOORKEEPER_APP_URL = "http://the-provider.com" # URL to the provider

If you want to test it out you can use our sample provider using doorkeeper gem. It's available here. In order to add your application and get your appication ID and SECRET click here.

Now you are ready to start the app

rails s

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 87.6%
  • HTML 9.4%
  • JavaScript 1.9%
  • CSS 1.1%