Call refresh_token to set token time stamps

This commit is contained in:
2023-12-30 20:26:30 -05:00
parent f094ef57ec
commit 81f322b616
2 changed files with 2 additions and 0 deletions

View File

@@ -7,6 +7,7 @@ gem 'nhtsa_vin'
gem 'will_paginate'
gem 'rails-jquery-autocomplete'
gem 'jquery-ui-rails'
gem 'listen', '~> 3.3'
group :assets do
gem 'coffee-rails'

View File

@@ -48,6 +48,7 @@ class QboController < ApplicationController
# Save the authentication information
qbo = Qbo.new
qbo.update(oauth2_access_token: resp.token, oauth2_refresh_token: resp.refresh_token, realm_id: params[:realmId])
qbo.refresh_token!
if qbo.save!
redirect_to qbo_sync_path, :flash => { :notice => "Successfully connected to Quickbooks" }