added https to redirect_uri

This commit is contained in:
2024-08-19 20:02:22 -04:00
parent 6c6de0ba86
commit 0729d2ac41

View File

@@ -26,9 +26,10 @@ class QboController < ApplicationController
# Called when the user requests that Redmine to connect to QBO # Called when the user requests that Redmine to connect to QBO
# #
def authenticate def authenticate
logger.info "redirect_uri: " + Setting.host_name + qbo_oauth_callback_path redirect_uri = "https://" + Setting.host_name + qbo_oauth_callback_path
logger.info "redirect_uri: " + redirect_uri
oauth2_client = Qbo.construct_oauth2_client oauth2_client = Qbo.construct_oauth2_client
grant_url = oauth2_client.auth_code.authorize_url(redirect_uri: Setting.host_name + qbo_oauth_callback_path, response_type: "code", state: SecureRandom.hex(12), scope: "com.intuit.quickbooks.accounting") grant_url = oauth2_client.auth_code.authorize_url(redirect_uri: redirect_uri, response_type: "code", state: SecureRandom.hex(12), scope: "com.intuit.quickbooks.accounting")
redirect_to grant_url redirect_to grant_url
end end