Skip to content

Latest commit

 

History

History
21 lines (13 loc) · 769 Bytes

README.md

File metadata and controls

21 lines (13 loc) · 769 Bytes

google_oauth2_model

Build Status Dependency Status

Allow a model to store google oauth2 access and refresh tokens.

Your model is expected to have the following columns:

  • oauth2_token: string
  • oauth2_token_expires_at: datetime
  • oauth2_refresh_token: string

First, set your Google key and secret:

GoogleOauth2Model.consumer_key = '<your google key>'
GoogleOauth2Model.consumer_secret = '<your google secret>'

Then, in your model, include the methods:

include GoogleOauth2Model::GoogleAccessToken::OwnerMethods