Skip to content

Commit

Permalink
Hack in the redirect_uri param
Browse files Browse the repository at this point in the history
  • Loading branch information
kj committed Jul 25, 2017
1 parent 8e4e991 commit 1ece49d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/lucid_shopify/services/authenticate.rb
@@ -1,6 +1,7 @@
require 'faraday'
require 'digest'
require 'json'
require 'uri'

module LucidShopify

Expand Down Expand Up @@ -82,7 +83,9 @@ def domain
# Redirect user to this path for authorization.
#
def code_uri
"#{auth_uri}?client_id=#{api_key}&scope=#{scope}"
redirect_uri = URI.encode_www_form_component(callback_uri)

"#{auth_uri}?client_id=#{api_key}&scope=#{scope}&redirect_uri=#{redirect_uri}"
end

private
Expand Down

0 comments on commit 1ece49d

Please sign in to comment.