Skip to content

Commit

Permalink
Fix broken app link from admin.
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanahsmith committed Feb 4, 2013
1 parent 24e11ea commit 27d5091
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ an app. You can also create test shops once you're logged in as a
partner.

When you create your app in the Shopify Partner Account, set the
return URL to "http://localhost:8000/login/finalize", and set the
return URL to "http://localhost:8000/login", and set the
authentication type to OAuth2.

Regular Django Application
Expand Down Expand Up @@ -95,7 +95,7 @@ Google App Engine

7. When you are ready to deploy your application, update the return
URL on Shopify to point to your App Engine domain name (e.g.
https://APPLICATION-ID.appspot.com/login/finalize).
https://APPLICATION-ID.appspot.com/login).

Then upload the application:

Expand Down
3 changes: 2 additions & 1 deletion shopify_app/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ def authenticate(request):
shop = request.REQUEST.get('shop')
if shop:
scope = settings.SHOPIFY_API_SCOPE
permission_url = shopify.Session.create_permission_url(shop.strip(), scope)
redirect_uri = request.build_absolute_uri(reverse('shopify_app.views.finalize'))
permission_url = shopify.Session.create_permission_url(shop.strip(), scope, redirect_uri)
return redirect(permission_url)

return redirect(_return_address(request))
Expand Down

0 comments on commit 27d5091

Please sign in to comment.