Skip to content
This repository has been archived by the owner on Aug 12, 2019. It is now read-only.

p-l/oauth2_google_grantable

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

oauth2_google_grantable

Adds a grant_type "google" to the existing installation of devise_oauth2_providable

Features

Requirements

Installation

Install gem

# Gemfile
gem 'oauth2_google_grantable'

Configure User model to support Google authentication

Add :oauth2_google_grantable to your devise declaration as seen bellow.

class User
  devise :oauth2_providable,
    :oauth2_password_grantable,
    :oauth2_refresh_token_grantable,
    :oauth2_google_grantable
end

Using with Google grant_type on the client-side

To authentitcate against to the API using Google credentials you need to post the API with the parameter google_token as shown bellow:

post("/oauth/token",
  :format => :json,
  :google_token => TOKEN,
  :grant_type => "google",
  :client_secret => client_secret,
  :client_id => client_identifier)

Contributing

  • Fork the project
  • Fix the issue
  • Add unit tests
  • Submit pull request on github

License

Copyright (C) 2013 Pierre-Luc Simard See LICENSE.txt for further details.

About

Add google grant_type to devise_oauth2_providable

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages