Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Fix inconsistency in authentication path prefix to remove trailing slash #29

Merged
merged 1 commit into from
Oct 22, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/auth/client/request-storage-access.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
// Copied from https://github.com/Shopify/shopify_app
const requestStorageAccess = (shop: string, prefix = '/') => {
const requestStorageAccess = (shop: string, prefix = '') => {
return `(function() {
function redirect() {
var targetInfo = {
myshopifyUrl: "https://${encodeURIComponent(shop)}",
hasStorageAccessUrl: "${prefix}auth/inline?shop=${encodeURIComponent(
hasStorageAccessUrl: "${prefix}/auth/inline?shop=${encodeURIComponent(
shop,
)}",
doesNotHaveStorageAccessUrl: "${prefix}auth/enable_cookies?shop=${encodeURIComponent(
doesNotHaveStorageAccessUrl: "${prefix}/auth/enable_cookies?shop=${encodeURIComponent(
shop,
)}",
appTargetUrl: "${prefix}?shop=${encodeURIComponent(shop)}"
appTargetUrl: "${prefix}/?shop=${encodeURIComponent(shop)}"
}

if (window.top == window.self) {
Expand Down