The happy_seed:googleoauth
depends upon happy_seed:omniauth
and
If you want to have the user connect via google, this is the one line command for it.
GOOGLE_OAUTH2_APP_ID=
GOOGLE_OAUTH2_APP_SECRET=
In config/initializers/devise.rb make sure that the scope you are requesting is correct.
Since you need to set the callbacks as urls, you'll need to create one app for local development and another app for production. (Possibly one for staging as well.)
Once you have the client connected, then you need to discover the API.
client = user.google_oauth2_client
admin_api = client.discovered_api("admin", "directory_v1")
request = { api_method: admin_api.users.list }
request[:parameters] = { domain: "happyfuncorp.com" }
response = client.execute request