{"repo":"zquestz/omniauth-google-oauth2","free":true,"listed":false,"github":"https://github.com/zquestz/omniauth-google-oauth2","clone":"git clone https://github.com/zquestz/omniauth-google-oauth2.git","description":"Oauth2 strategy for Google","language":"Ruby","stars":1523,"topics":["ruby","omniauth","google-oauth2","oauth2"],"license":null,"category":"auth-billing-email","readme_excerpt":"OmniAuth Google OAuth2 Strategy Strategy to authenticate with Google via OAuth2 in OmniAuth. Get your API key at: https://console.cloud.google.com Note the Client ID and the Client Secret. For more details, read the Google docs: https://developers.google.com/identity/protocols/oauth2 Installation Add to your Gemfile : Then bundle install . Google API Setup Go to 'https://console.cloud.google.com' Select your project. Go to Credentials, then select the \"OAuth consent screen\" tab on top, and provide an 'EMAIL ADDRESS' and a 'PRODUCT NAME' Wait 10 minutes for changes to take effect. Usage Here's an example for adding the middleware to a Rails app in config/initializers/omniauth.rb : You can now access the OmniAuth Google OAuth2 URL: /auth/google oauth2 For more examples please check out examples/omni auth.rb Using Devise? Skip the above and jump down to the Devise section! After setting up the provider via Devise, you can reference the configurations below. NOTE: While developing your application, if you change the scope in the initializer you will need to restart your app server. Remember that either the 'email' or 'profile' scope is required! Configuration You can configure several options, which you pass in to the provider method via a hash: scope : A comma-separated list of permissions you want to request from the user. See the Google OAuth 2.0 Playground for a full list of available permissions. Caveats: The email and profile scopes are used by default. By defining your own","default_branch":null,"files":null,"tree":[],"storefront":"/r/zquestz","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/zquestz/omniauth-google-oauth2/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}