Module: Sorcery::Controller::Submodules::External::Providers::Google

Defined in:
lib/sorcery/controller/submodules/external/providers/google.rb

Overview

This module adds support for OAuth with google.com. When included in the 'config.providers' option, it adds a new option, 'config.google'. Via this new option you can configure Google specific settings like your app's key and secret.

config.google.key = <key>
config.google.secret = <secret>
...

Defined Under Namespace

Modules: GoogleClient

Class Method Summary (collapse)

Class Method Details

+ (Object) included(base)



15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/sorcery/controller/submodules/external/providers/google.rb', line 15

def self.included(base)
  base.module_eval do
    class << self
      attr_reader :google                           # access to google_client.

      def merge_google_defaults!
        @defaults.merge!(:@google => GoogleClient)
      end
    end
    merge_google_defaults!
    update!
  end
end