lib/gatleon/rails/authform/concern.rb in gatleon-rails-0.1.6 vs lib/gatleon/rails/authform/concern.rb in gatleon-rails-0.1.8
- old
+ new
@@ -2,11 +2,11 @@
module Rails
module Authform
class Concern < Module
def initialize(form_uid:,
current_user_method_name: "current_user",
- root_url: "https://authform.gatleon.com")
+ _authform_base_url: "https://authform.gatleon.com")
super() do
extend ActiveSupport::Concern
included do
helper_method "#{current_user_method_name}".to_sym
@@ -25,10 +25,10 @@
end
define_method :_exchange_user_voucher_for_user do
if params[:_authformForm] == form_uid && params[:_authformUserVoucher]
# TODO: headers for api verification
- response = Faraday.get("#{root_url}/v1/exchangeUserVoucherForUser/#{params[:_authformUserVoucher]}")
+ response = Faraday.get("#{authform_base_url}/v1/exchangeUserVoucherForUser/#{params[:_authformUserVoucher]}")
if response.status == 200
cookies[_authform_user_cookie_key] = {
value: response.body,
domain: :all