Commit 4f8dc0df by tady

fix static vars

parent 9003cb10
...@@ -44,8 +44,8 @@ class User < ActiveRecord::Base ...@@ -44,8 +44,8 @@ class User < ActiveRecord::Base
builder.adapter :net_http builder.adapter :net_http
end end
response = conn.post '/o/oauth2/token', response = conn.post '/o/oauth2/token',
client_id: ENV['GOOGLE_KEY'], client_id: Settings.google_api.client_id,
client_secret: ENV['GOOGLE_SECRET'], client_secret: Settings.google_api.secret,
refresh_token: google_refresh_token, refresh_token: google_refresh_token,
grant_type: 'refresh_token' grant_type: 'refresh_token'
......
Rails.application.config.middleware.use OmniAuth::Builder do Rails.application.config.middleware.use OmniAuth::Builder do
provider :google_oauth2, ENV['GOOGLE_CLIENT_ID'], ENV['GOOGLE_CLIENT_SECRET'], provider :google_oauth2, Settings.google_api.client_id, Settings.google_api.secret,
name: 'google_oauth2', name: 'google_oauth2',
scope: 'https://mail.google.com/, userinfo.email, userinfo.profile', scope: 'https://mail.google.com/, userinfo.email, userinfo.profile',
access_type: 'offline', access_type: 'offline',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment