Skip to content
This repository has been archived by the owner on Oct 1, 2024. It is now read-only.

Wrap redirectTo values in double quotes #1613

Merged
merged 1 commit into from
Aug 26, 2020
Merged
Show file tree
Hide file tree
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
4 changes: 3 additions & 1 deletion packages/koa-shopify-auth/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

<!-- ## [Unreleased] -->
## [Unreleased]

- Wrap `encodeURI` values in double quotes [1613](https://github.com/Shopify/quilt/pull/1613)

## [3.1.67] - 2020-08-26

Expand Down
6 changes: 3 additions & 3 deletions packages/koa-shopify-auth/src/auth/redirection-page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@ export default function redirectionScript({origin, redirectTo, apiKey}) {
document.addEventListener('DOMContentLoaded', function() {
if (window.top === window.self) {
// If the current window is the 'parent', change the URL by setting location.href
window.location.href = '${redirectTo}';
window.location.href = "${redirectTo}";
} else {
// If the current window is the 'child', change the parent's URL with postMessage
var AppBridge = window['app-bridge'];
var createApp = AppBridge.default;
var Redirect = AppBridge.actions.Redirect;
var app = createApp({
apiKey: '${apiKey}',
apiKey: "${apiKey}",
shopOrigin: "${encodeURI(origin)}",
});
var redirect = Redirect.create(app);
redirect.dispatch(Redirect.Action.REMOTE, '${redirectTo}');
redirect.dispatch(Redirect.Action.REMOTE, "${redirectTo}");
}
});
</script>
Expand Down