mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2025-11-08 08:54:23 -05:00
Call refresh_token to set token time stamps
This commit is contained in:
1
Gemfile
1
Gemfile
@@ -7,6 +7,7 @@ gem 'nhtsa_vin'
|
|||||||
gem 'will_paginate'
|
gem 'will_paginate'
|
||||||
gem 'rails-jquery-autocomplete'
|
gem 'rails-jquery-autocomplete'
|
||||||
gem 'jquery-ui-rails'
|
gem 'jquery-ui-rails'
|
||||||
|
gem 'listen', '~> 3.3'
|
||||||
|
|
||||||
group :assets do
|
group :assets do
|
||||||
gem 'coffee-rails'
|
gem 'coffee-rails'
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ class QboController < ApplicationController
|
|||||||
# Save the authentication information
|
# Save the authentication information
|
||||||
qbo = Qbo.new
|
qbo = Qbo.new
|
||||||
qbo.update(oauth2_access_token: resp.token, oauth2_refresh_token: resp.refresh_token, realm_id: params[:realmId])
|
qbo.update(oauth2_access_token: resp.token, oauth2_refresh_token: resp.refresh_token, realm_id: params[:realmId])
|
||||||
|
qbo.refresh_token!
|
||||||
|
|
||||||
if qbo.save!
|
if qbo.save!
|
||||||
redirect_to qbo_sync_path, :flash => { :notice => "Successfully connected to Quickbooks" }
|
redirect_to qbo_sync_path, :flash => { :notice => "Successfully connected to Quickbooks" }
|
||||||
|
|||||||
Reference in New Issue
Block a user