Module: GoogleDrive::AuthenticationHelper

Defined in:
lib/model_to_googlesheet/google_drive/authentication_helper.rb

Class Method Summary collapse

Class Method Details

.set_auth(client_id, client_secret) ⇒ Object

private



5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/model_to_googlesheet/google_drive/authentication_helper.rb', line 5

def self.set_auth client_id, client_secret
	auth = Google::APIClient.new({application_name: 'Db To Googlesheet'}).authorization
	auth.client_id = client_id
	auth.client_secret = client_secret

	auth.scope =
		"https://www.googleapis.com/auth/drive " +
		"https://spreadsheets.google.com/feeds/"
	auth.redirect_uri = "urn:ietf:wg:oauth:2.0:oob"

	auth
end